universe@375: set(sources universe@375: allocator.c universe@375: array.c universe@375: avl.c universe@375: buffer.c universe@375: list.c universe@375: logging.c universe@375: map.c universe@375: mempool.c universe@375: properties.c universe@375: stack.c universe@375: string.c universe@375: test.c universe@375: ucx.c universe@375: utils.c universe@375: ) universe@377: set(headers universe@377: ucx/allocator.h universe@377: ucx/array.h universe@377: ucx/avl.h universe@377: ucx/buffer.h universe@377: ucx/list.h universe@377: ucx/logging.h universe@377: ucx/map.h universe@377: ucx/mempool.h universe@377: ucx/properties.h universe@377: ucx/stack.h universe@377: ucx/string.h universe@377: ucx/test.h universe@377: ucx/ucx.h universe@377: ucx/utils.h universe@377: ) universe@375: universe@375: add_library(ucx SHARED ${sources}) universe@375: add_library(ucx_static STATIC ${sources}) universe@375: universe@375: target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) universe@375: target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) universe@375: universe@375: set_target_properties(ucx PROPERTIES SOVERSION 3 VERSION 3.1.0) universe@375: set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION}) universe@377: universe@377: # it is sufficient to specify the headers for one of the targets universe@377: set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}") universe@377: universe@377: include(GNUInstallDirs) universe@377: install(TARGETS ucx ucx_static universe@377: LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} universe@377: ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} universe@377: PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx)