src/CMakeLists.txt

Fri, 27 May 2022 13:25:42 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 27 May 2022 13:25:42 +0200
changeset 558
9b767b07602c
parent 549
d7f0b5a9a985
child 563
69a83fad8a35
permissions
-rw-r--r--

add convenience function to make keys from strings

universe@375 1 set(sources
universe@483 2 utils.c
universe@391 3 allocator.c
universe@503 4 list.c
universe@398 5 linked_list.c
olaf@424 6 tree.c
universe@483 7 buffer.c
universe@558 8 map.c
universe@549 9 hash_map.c
universe@375 10 )
universe@377 11 set(headers
universe@549 12 cx/common.h
universe@483 13 cx/utils.h
universe@391 14 cx/allocator.h
universe@494 15 cx/iterator.h
universe@390 16 cx/list.h
universe@398 17 cx/linked_list.h
universe@470 18 cx/tree.h
universe@483 19 cx/buffer.h
universe@549 20 cx/map.h
universe@549 21 cx/hash_map.h
universe@549 22 )
universe@375 23
universe@375 24 add_library(ucx SHARED ${sources})
universe@375 25 add_library(ucx_static STATIC ${sources})
universe@375 26
universe@375 27 target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
universe@375 28 target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
universe@375 29
universe@390 30 set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.0)
universe@375 31 set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION})
universe@377 32
universe@377 33 # it is sufficient to specify the headers for one of the targets
universe@377 34 set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}")
universe@377 35
universe@377 36 include(GNUInstallDirs)
universe@377 37 install(TARGETS ucx ucx_static
universe@377 38 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
universe@377 39 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
universe@377 40 PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx)

mercurial