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
Raw Normal View History

2020-02-24 20:13:53 +01:00
include(GNUInstallDirs)
find_package(mastodonpp REQUIRED CONFIG)
2020-02-29 22:11:16 +01:00
find_package(Filesystem REQUIRED)
find_package(nlohmann_json REQUIRED CONFIG)
2020-02-24 20:13:53 +01:00
add_library(${PROJECT_NAME})
file(GLOB_RECURSE sources_lib *.cpp)
file(GLOB_RECURSE headers_lib *.hpp)
2020-02-24 20:13:53 +01:00
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)
2020-02-24 20:13:53 +01:00
install(TARGETS ${PROJECT_NAME}
EXPORT "${PROJECT_NAME}Targets"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")