12 string.c |
12 string.c |
13 test.c |
13 test.c |
14 ucx.c |
14 ucx.c |
15 utils.c |
15 utils.c |
16 ) |
16 ) |
|
17 set(headers |
|
18 ucx/allocator.h |
|
19 ucx/array.h |
|
20 ucx/avl.h |
|
21 ucx/buffer.h |
|
22 ucx/list.h |
|
23 ucx/logging.h |
|
24 ucx/map.h |
|
25 ucx/mempool.h |
|
26 ucx/properties.h |
|
27 ucx/stack.h |
|
28 ucx/string.h |
|
29 ucx/test.h |
|
30 ucx/ucx.h |
|
31 ucx/utils.h |
|
32 ) |
17 |
33 |
18 add_library(ucx SHARED ${sources}) |
34 add_library(ucx SHARED ${sources}) |
19 add_library(ucx_static STATIC ${sources}) |
35 add_library(ucx_static STATIC ${sources}) |
20 |
36 |
21 target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
37 target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
22 target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
38 target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
23 |
39 |
24 set_target_properties(ucx PROPERTIES SOVERSION 3 VERSION 3.1.0) |
40 set_target_properties(ucx PROPERTIES SOVERSION 3 VERSION 3.1.0) |
25 set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION}) |
41 set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION}) |
|
42 |
|
43 # it is sufficient to specify the headers for one of the targets |
|
44 set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}") |
|
45 |
|
46 include(GNUInstallDirs) |
|
47 install(TARGETS ucx ucx_static |
|
48 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
|
49 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
|
50 PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx) |