-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
41 lines (31 loc) · 1.24 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.0.0)
project(resource-pool VERSION 0.1.0)
include(CMakePackageConfigHelpers)
#include(CTest)
#enable_testing()
add_library(resource-pool STATIC resource_pool.hpp resource_pool.cpp)
#add_executable(resource-pool main.cpp)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
target_include_directories(${PROJECT_NAME} PRIVATE ./)
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER resource_pool.hpp)
include(GNUInstallDirs)
install(
TARGETS ${PROJECT_NAME} EXPORT rsTargets # rsTargets needs to be defined here
# FILE_SET HEADERS
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
install(
EXPORT rsTargets # use exported name
FILE rsTargets.cmake
DESTINATION "${CMAKE_INSTALL_DATADIR}/resource-pool/cmake"
NAMESPACE resource-pool::
)
install(
FILES resource-pool-config.cmake
# ${CMAKE_CURRENT_BINARY_DIR}/resource-poolConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/../share/resource-pool)
include(CPack)