src/CMakeLists.txt

Wed, 18 May 2022 16:26:32 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 18 May 2022 16:26:32 +0200
changeset 549
d7f0b5a9a985
parent 503
a89857072ace
child 558
9b767b07602c
permissions
-rw-r--r--

#189 declare basic map functions

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

mercurial