summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
author李佳 <[email protected]>2019-07-09 13:13:45 +0800
committer李佳 <[email protected]>2019-07-09 13:13:45 +0800
commit906233f67e243953a9b84cb4dff93919fbbf0811 (patch)
tree9d4eeb42c7208a2db67d5547c32534254feca00f /CMakeLists.txt
parentcdf19e44025cb75b57d8b551f6b040201c1a79c3 (diff)
Master
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..f806d7d
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required (VERSION 2.8)
+
+set(lib_name hello_ci_world)
+
+project (${lib_name})
+
+file(GLOB SRC
+ "src/*.c"
+ "src/*.cpp"
+)
+
+LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib)
+
+# static Library Output
+add_library(${lib_name} STATIC ${SRC})
+set_target_properties(${lib_name} PROPERTIES OUTPUT_NAME ${lib_name})
+
+add_executable(test_hello_ci_world test/test.c)
+target_link_libraries(test_hello_ci_world ${lib_name})
+
+
+set(CMAKE_INSTALL_RPATH ${CMAKE_SOURCE_DIR}/lib)
+SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+
+#install(TARGETS ${lib_name} LIBRARY DESTINATION ${CMAKE_SOURCE_DIR}/lib)
+install(TARGETS test_hello_ci_world DESTINATION ${CMAKE_SOURCE_DIR}/test)