This repository has been archived on 2020-04-18. You can view files and clone it, but cannot push or open issues or pull requests.
FediPotato/lib/src/CMakeLists.txt

26 lines
741 B
CMake

include(GNUInstallDirs)
find_package(mastodonpp REQUIRED CONFIG)
find_package(Filesystem REQUIRED)
find_package(nlohmann_json REQUIRED CONFIG)
add_library(${PROJECT_NAME})
file(GLOB_RECURSE sources_lib *.cpp)
file(GLOB_RECURSE headers_lib *.hpp)
target_sources(${PROJECT_NAME}
PRIVATE "${sources_lib}" "${headers_lib}")
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${${PROJECT_NAME}_VERSION_MAJOR})
target_link_libraries(${PROJECT_NAME}
PRIVATE mastodonpp::mastodonpp
PUBLIC std::filesystem nlohmann_json::nlohmann_json)
install(TARGETS ${PROJECT_NAME}
EXPORT "${PROJECT_NAME}Targets"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")