src/CMakeLists.txt

Wed, 08 Jun 2022 21:33:31 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 08 Jun 2022 21:33:31 +0200
changeset 563
69a83fad8a35
parent 558
9b767b07602c
child 571
f83583a0bbac
permissions
-rw-r--r--

improve hash key handling

     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 )
    11 set(headers
    12         cx/common.h
    13         cx/utils.h
    14         cx/allocator.h
    15         cx/iterator.h
    16         cx/list.h
    17         cx/linked_list.h
    18         cx/tree.h
    19         cx/buffer.h
    20         cx/map.h
    21         cx/hash_key.h
    22         cx/hash_map.h
    23         )
    25 add_library(ucx SHARED ${sources})
    26 add_library(ucx_static STATIC ${sources})
    28 target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
    29 target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
    31 set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.0)
    32 set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION})
    34 # it is sufficient to specify the headers for one of the targets
    35 set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}")
    37 include(GNUInstallDirs)
    38 install(TARGETS ucx ucx_static
    39         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    40         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    41         PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx)

mercurial