src/CMakeLists.txt

Wed, 07 Dec 2022 21:07:54 +0100

author
Mike Becker <universe@uap-core.de>
date
Wed, 07 Dec 2022 21:07:54 +0100
changeset 632
164253538794
parent 606
314e9288af2f
child 677
b09aae58bba4
permissions
-rw-r--r--

fix public header destination

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

mercurial