universe@375: set(sources universe@391: allocator.c universe@375: list.c universe@398: linked_list.c universe@375: ) universe@377: set(headers universe@391: cx/allocator.h universe@390: cx/list.h universe@398: cx/linked_list.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@390: set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.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)