src/CMakeLists.txt

Sun, 21 May 2023 16:22:09 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 21 May 2023 16:22:09 +0200
changeset 710
2dd409ed056f
parent 706
8c6edaccaef1
child 718
cf2f209b9da2
permissions
-rw-r--r--

fix const-ness of non-mutating iterator creation for maps

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

mercurial