You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
771 B

cmake_minimum_required(VERSION 3.20)
project(board LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(GlobalOptions)
include(GNUInstallDirs)
include(Format)
# keep PUBLIC dependencies in sync with cmake/config.cmake.in
find_package(Boost REQUIRED)
add_subdirectory(src)
install(DIRECTORY include TYPE INCLUDE FILES_MATCHING PATTERN *.h)
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-targets)
install(EXPORT ${PROJECT_NAME}-targets NAMESPACE ${PROJECT_NAME}::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}")
configure_file(cmake/config.cmake.in ${PROJECT_NAME}-config.cmake @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}")