src/CMakeLists.txt

Mon, 29 Aug 2022 20:54:42 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 29 Aug 2022 20:54:42 +0200
changeset 576
ba0c4ff6698e
parent 571
f83583a0bbac
child 599
6536a9a75b71
permissions
-rw-r--r--

first proposal for the string header

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

mercurial