src/CMakeLists.txt

Tue, 15 Feb 2022 19:41:48 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 15 Feb 2022 19:41:48 +0100
changeset 503
a89857072ace
parent 494
6ce8cfa10a96
child 549
d7f0b5a9a985
permissions
-rw-r--r--

add new destructor API and apply it to CxList

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

mercurial