src/CMakeLists.txt

Sun, 07 Feb 2021 12:20:07 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 07 Feb 2021 12:20:07 +0100
changeset 391
f094a53c1178
parent 390
d345541018fa
child 398
8d506ed6c1c0
permissions
-rw-r--r--

adds allocator interface and default implementation

universe@375 1 set(sources
universe@391 2 allocator.c
universe@375 3 list.c
universe@375 4 )
universe@377 5 set(headers
universe@391 6 cx/allocator.h
universe@390 7 cx/list.h
universe@377 8 )
universe@375 9
universe@375 10 add_library(ucx SHARED ${sources})
universe@375 11 add_library(ucx_static STATIC ${sources})
universe@375 12
universe@375 13 target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
universe@375 14 target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
universe@375 15
universe@390 16 set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.0)
universe@375 17 set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION})
universe@377 18
universe@377 19 # it is sufficient to specify the headers for one of the targets
universe@377 20 set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}")
universe@377 21
universe@377 22 include(GNUInstallDirs)
universe@377 23 install(TARGETS ucx ucx_static
universe@377 24 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
universe@377 25 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
universe@377 26 PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx)

mercurial