Mon, 30 Dec 2019 09:52:44 +0100
merges closed feature/array branch
universe@375 | 1 | set(sources |
universe@375 | 2 | allocator.c |
universe@375 | 3 | array.c |
universe@375 | 4 | avl.c |
universe@375 | 5 | buffer.c |
universe@375 | 6 | list.c |
universe@375 | 7 | logging.c |
universe@375 | 8 | map.c |
universe@375 | 9 | mempool.c |
universe@375 | 10 | properties.c |
universe@375 | 11 | stack.c |
universe@375 | 12 | string.c |
universe@375 | 13 | test.c |
universe@375 | 14 | ucx.c |
universe@375 | 15 | utils.c |
universe@375 | 16 | ) |
universe@377 | 17 | set(headers |
universe@377 | 18 | ucx/allocator.h |
universe@377 | 19 | ucx/array.h |
universe@377 | 20 | ucx/avl.h |
universe@377 | 21 | ucx/buffer.h |
universe@377 | 22 | ucx/list.h |
universe@377 | 23 | ucx/logging.h |
universe@377 | 24 | ucx/map.h |
universe@377 | 25 | ucx/mempool.h |
universe@377 | 26 | ucx/properties.h |
universe@377 | 27 | ucx/stack.h |
universe@377 | 28 | ucx/string.h |
universe@377 | 29 | ucx/test.h |
universe@377 | 30 | ucx/ucx.h |
universe@377 | 31 | ucx/utils.h |
universe@377 | 32 | ) |
universe@375 | 33 | |
universe@375 | 34 | add_library(ucx SHARED ${sources}) |
universe@375 | 35 | add_library(ucx_static STATIC ${sources}) |
universe@375 | 36 | |
universe@375 | 37 | target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
universe@375 | 38 | target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
universe@375 | 39 | |
universe@375 | 40 | set_target_properties(ucx PROPERTIES SOVERSION 3 VERSION 3.1.0) |
universe@375 | 41 | set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION}) |
universe@377 | 42 | |
universe@377 | 43 | # it is sufficient to specify the headers for one of the targets |
universe@377 | 44 | set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}") |
universe@377 | 45 | |
universe@377 | 46 | include(GNUInstallDirs) |
universe@377 | 47 | install(TARGETS ucx ucx_static |
universe@377 | 48 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
universe@377 | 49 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
universe@377 | 50 | PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx) |