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

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

mercurial