src/CMakeLists.txt

Tue, 05 Oct 2021 16:22:48 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 05 Oct 2021 16:22:48 +0200
branch
support/2.x
changeset 471
e9ef2637e101
parent 377
2099a3aff61e
child 390
d345541018fa
permissions
-rw-r--r--

add new ucx_list_sort test

set(sources
        allocator.c
        array.c
        avl.c
        buffer.c
        list.c
        logging.c
        map.c
        mempool.c
        properties.c
        stack.c
        string.c
        test.c
        ucx.c
        utils.c
)
set(headers
        ucx/allocator.h
        ucx/array.h
        ucx/avl.h
        ucx/buffer.h
        ucx/list.h
        ucx/logging.h
        ucx/map.h
        ucx/mempool.h
        ucx/properties.h
        ucx/stack.h
        ucx/string.h
        ucx/test.h
        ucx/ucx.h
        ucx/utils.h
)

add_library(ucx SHARED ${sources})
add_library(ucx_static STATIC ${sources})

target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

set_target_properties(ucx PROPERTIES SOVERSION 3 VERSION 3.1.0)
set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION})

# it is sufficient to specify the headers for one of the targets
set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}")

include(GNUInstallDirs)
install(TARGETS ucx ucx_static
        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
        PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx)

mercurial