Sat, 06 Feb 2021 19:11:44 +0100
starts ucx 3.0 development
1 set(sources
2 list.c
3 )
4 set(headers
5 cx/list.h
6 )
8 add_library(ucx SHARED ${sources})
9 add_library(ucx_static STATIC ${sources})
11 target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
12 target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
14 set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.0)
15 set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION})
17 # it is sufficient to specify the headers for one of the targets
18 set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}")
20 include(GNUInstallDirs)
21 install(TARGETS ucx ucx_static
22 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
23 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
24 PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx)