Sat, 22 Jan 2022 17:15:14 +0100
add iterator interface + linked list iterator
universe@375 | 1 | set(sources |
universe@483 | 2 | utils.c |
universe@391 | 3 | allocator.c |
universe@398 | 4 | linked_list.c |
olaf@424 | 5 | tree.c |
universe@483 | 6 | buffer.c |
universe@375 | 7 | ) |
universe@377 | 8 | set(headers |
universe@483 | 9 | cx/utils.h |
universe@391 | 10 | cx/allocator.h |
universe@494 | 11 | cx/iterator.h |
universe@390 | 12 | cx/list.h |
universe@398 | 13 | cx/linked_list.h |
universe@470 | 14 | cx/tree.h |
universe@483 | 15 | cx/buffer.h |
universe@377 | 16 | ) |
universe@375 | 17 | |
universe@375 | 18 | add_library(ucx SHARED ${sources}) |
universe@375 | 19 | add_library(ucx_static STATIC ${sources}) |
universe@375 | 20 | |
universe@375 | 21 | target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
universe@375 | 22 | target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
universe@375 | 23 | |
universe@390 | 24 | set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.0) |
universe@375 | 25 | set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION}) |
universe@377 | 26 | |
universe@377 | 27 | # it is sufficient to specify the headers for one of the targets |
universe@377 | 28 | set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}") |
universe@377 | 29 | |
universe@377 | 30 | include(GNUInstallDirs) |
universe@377 | 31 | install(TARGETS ucx ucx_static |
universe@377 | 32 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
universe@377 | 33 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
universe@377 | 34 | PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx) |