src/CMakeLists.txt

Wed, 03 Aug 2022 17:27:55 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 03 Aug 2022 17:27:55 +0200
changeset 571
f83583a0bbac
parent 563
69a83fad8a35
child 576
ba0c4ff6698e
permissions
-rw-r--r--

#201 - add mempool implementation

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

mercurial