src/CMakeLists.txt

Wed, 28 Jun 2023 20:07:52 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 28 Jun 2023 20:07:52 +0200
changeset 727
d92a59f5d261
parent 718
cf2f209b9da2
permissions
-rw-r--r--

improve mempool implementation

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

mercurial