src/CMakeLists.txt

Mon, 27 Dec 2021 16:51:10 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 27 Dec 2021 16:51:10 +0100
changeset 483
929016224c3c
parent 470
e5a4de4f1e03
child 494
6ce8cfa10a96
permissions
-rw-r--r--

add ported UCX buffer implementation

Notes:
* ucx_buffer_extend has been removed
in favor of cxBufferMinimumCapacity
* the buffer struct now has a union for
char* and unsigned char* buffers

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

mercurial