Sat, 05 Nov 2022 17:17:17 +0100
#222 add printf-like functions
universe@375 | 1 | set(sources |
universe@483 | 2 | utils.c |
universe@391 | 3 | allocator.c |
universe@576 | 4 | string.c |
universe@503 | 5 | list.c |
universe@398 | 6 | linked_list.c |
olaf@424 | 7 | tree.c |
universe@483 | 8 | buffer.c |
universe@563 | 9 | hash_key.c |
universe@549 | 10 | hash_map.c |
universe@571 | 11 | basic_mempool.c |
universe@599 | 12 | printf.c |
universe@375 | 13 | ) |
universe@377 | 14 | set(headers |
universe@549 | 15 | cx/common.h |
universe@483 | 16 | cx/utils.h |
universe@576 | 17 | cx/string.h |
universe@391 | 18 | cx/allocator.h |
universe@494 | 19 | cx/iterator.h |
universe@390 | 20 | cx/list.h |
universe@398 | 21 | cx/linked_list.h |
universe@470 | 22 | cx/tree.h |
universe@483 | 23 | cx/buffer.h |
universe@549 | 24 | cx/map.h |
universe@563 | 25 | cx/hash_key.h |
universe@549 | 26 | cx/hash_map.h |
universe@571 | 27 | cx/mempool.h |
universe@571 | 28 | cx/basic_mempool.h |
universe@599 | 29 | cx/printf.h |
universe@549 | 30 | ) |
universe@375 | 31 | |
universe@375 | 32 | add_library(ucx SHARED ${sources}) |
universe@375 | 33 | add_library(ucx_static STATIC ${sources}) |
universe@375 | 34 | |
universe@375 | 35 | target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
universe@375 | 36 | target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
universe@375 | 37 | |
universe@390 | 38 | set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.0) |
universe@375 | 39 | set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION}) |
universe@377 | 40 | |
universe@377 | 41 | # it is sufficient to specify the headers for one of the targets |
universe@377 | 42 | set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}") |
universe@377 | 43 | |
universe@377 | 44 | include(GNUInstallDirs) |
universe@377 | 45 | install(TARGETS ucx ucx_static |
universe@377 | 46 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
universe@377 | 47 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
universe@377 | 48 | PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx) |