From 7317ae3291a7703281d24f1f97b56af6bdafc6de Mon Sep 17 00:00:00 2001 From: carl Date: Tue, 19 Feb 2019 00:35:32 +0800 Subject: [PATCH] * Initial support of CMake --- modules/src/string/CMakeLists.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 modules/src/string/CMakeLists.txt diff --git a/modules/src/string/CMakeLists.txt b/modules/src/string/CMakeLists.txt new file mode 100644 index 000000000..e005b78de --- /dev/null +++ b/modules/src/string/CMakeLists.txt @@ -0,0 +1,31 @@ +cmake_minimum_required (VERSION 2.9) +project (string) + +set(SRC + bts2str.c + btscat.c + btscmp.c + btscpy.c + btszero.c + long2str.c + str2bts.c + str2long.c + strindex.c + strrindex.c + strzero.c + ack_string.h +) + + +add_library(${PROJECT_NAME} ${SRC}) +target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "ack_string.h") + +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + PUBLIC_HEADER DESTINATION include +) +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/string.3 DESTINATION man OPTIONAL) +