Sun, 07 Feb 2021 12:20:07 +0100
adds allocator interface and default implementation
1 set(sources
2 allocator.c
3 list.c
4 )
5 set(headers
6 cx/allocator.h
7 cx/list.h
8 )
10 add_library(ucx SHARED ${sources})
11 add_library(ucx_static STATIC ${sources})
13 target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
14 target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
16 set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.0)
17 set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION})
19 # it is sufficient to specify the headers for one of the targets
20 set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}")
22 include(GNUInstallDirs)
23 install(TARGETS ucx ucx_static
24 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
25 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
26 PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx)