src/CMakeLists.txt

Tue, 20 Jun 2023 19:20:51 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 20 Jun 2023 19:20:51 +0200
changeset 718
cf2f209b9da2
parent 706
8c6edaccaef1
child 727
d92a59f5d261
permissions
-rw-r--r--

remove trees from UCX 3.0

     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         basic_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/basic_mempool.h
    32         cx/printf.h
    33         cx/compare.h
    34         )
    36 add_library(ucx SHARED ${sources})
    37 add_library(ucx_static STATIC ${sources})
    39 target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
    40 target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
    42 set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.0)
    43 set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION})
    45 # it is sufficient to specify the headers for one of the targets
    46 set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}")
    48 include(GNUInstallDirs)
    49 install(TARGETS ucx ucx_static
    50         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    51         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    52         PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cx)

mercurial