From bd25701a3f6ceddc6a5c9672ba7b986bea599216 Mon Sep 17 00:00:00 2001 From: carl Date: Tue, 19 Feb 2019 00:34:44 +0800 Subject: [PATCH] * Initial support of CMake --- modules/src/print/CMakeLists.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 modules/src/print/CMakeLists.txt diff --git a/modules/src/print/CMakeLists.txt b/modules/src/print/CMakeLists.txt new file mode 100644 index 000000000..c48bf8ca0 --- /dev/null +++ b/modules/src/print/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required (VERSION 2.9) +project (print) + +set(SRC + doprnt.c + format.c + fprint.c + print.c + sprint.c + print.h + param.h +) + + +add_library(${PROJECT_NAME} ${SRC}) +target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "print.h") +target_link_libraries(${PROJECT_NAME} string system) + +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + PUBLIC_HEADER DESTINATION include +) +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/print.3 DESTINATION man OPTIONAL) +