src/CMakeLists.txt

Sat, 30 Apr 2022 09:03:17 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 30 Apr 2022 09:03:17 +0200
changeset 538
2cfbcbe86a7c
parent 503
a89857072ace
child 549
d7f0b5a9a985
permissions
-rw-r--r--

#170 first basic write tests

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

mercurial