src/CMakeLists.txt

Fri, 05 May 2023 19:07:56 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 05 May 2023 19:07:56 +0200
changeset 702
3390b58ad15a
parent 677
b09aae58bba4
child 706
8c6edaccaef1
permissions
-rw-r--r--

fix cx_linked_list_sort() not working for empty lists

     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         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/tree.h
    27         cx/buffer.h
    28         cx/map.h
    29         cx/hash_key.h
    30         cx/hash_map.h
    31         cx/mempool.h
    32         cx/basic_mempool.h
    33         cx/printf.h
    34         cx/compare.h
    35         )
    37 add_library(ucx SHARED ${sources})
    38 add_library(ucx_static STATIC ${sources})
    40 target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
    41 target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
    43 set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.0)
    44 set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION})
    46 # it is sufficient to specify the headers for one of the targets
    47 set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}")
    49 include(GNUInstallDirs)
    50 install(TARGETS ucx ucx_static
    51         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    52         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    53         PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cx)

mercurial