Sat, 06 Feb 2021 19:11:44 +0100
starts ucx 3.0 development
universe@375 | 1 | set(sources |
universe@375 | 2 | list.c |
universe@375 | 3 | ) |
universe@377 | 4 | set(headers |
universe@390 | 5 | cx/list.h |
universe@377 | 6 | ) |
universe@375 | 7 | |
universe@375 | 8 | add_library(ucx SHARED ${sources}) |
universe@375 | 9 | add_library(ucx_static STATIC ${sources}) |
universe@375 | 10 | |
universe@375 | 11 | target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
universe@375 | 12 | target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
universe@375 | 13 | |
universe@390 | 14 | set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.0) |
universe@375 | 15 | set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION}) |
universe@377 | 16 | |
universe@377 | 17 | # it is sufficient to specify the headers for one of the targets |
universe@377 | 18 | set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}") |
universe@377 | 19 | |
universe@377 | 20 | include(GNUInstallDirs) |
universe@377 | 21 | install(TARGETS ucx ucx_static |
universe@377 | 22 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
universe@377 | 23 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
universe@377 | 24 | PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx) |