summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlijia <[email protected]>2020-01-10 15:08:48 +0800
committerlijia <[email protected]>2020-01-10 15:08:48 +0800
commit381fadccd542a6c02eb42f8245975975b8183c23 (patch)
tree63ae1dd655775f4b72573dd5997f4216778036f7
parent6f793d36e120114bebc50d6aaeb3c235380bcd17 (diff)
修改CMakeList.txt, 解决RPM安装冲突问题.
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt8
-rw-r--r--service/CMakeLists.txt2
3 files changed, 10 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 7f636cd..bea0f8e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,5 @@ bin/sapp
cmake-build-debug
.vscode
./build/
+version.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 02fac99..ec08fa5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -175,6 +175,14 @@ add_subdirectory(./tools)
#by default, not include sapp_module_test dir
#add_subdirectory(./test/sapp_module_test/src)
+
+set(CMAKE_INSTALL_FULL_LIBEXECDIR ${CMAKE_INSTALL_PREFIX})
+set(CMAKE_INSTALL_FULL_SHAREDSTATEDIR ${CMAKE_INSTALL_PREFIX}/etc)
+#set(CMAKE_INSTALL_FULL_LIBDIR ${CMAKE_INSTALL_PREFIX}/plug)
+set(CMAKE_INSTALL_FULL_DATAROOTDIR ${CMAKE_INSTALL_PREFIX}/plug)
+set(CMAKE_INSTALL_FULL_SYSCONFDIR /usr/lib/systemd/system)
+
+#install(PROGRAMS ${CMAKE_BINARY_DIR}/src/entry/sapp DESTINATION .)
install(PROGRAMS ${CMAKE_BINARY_DIR}/src/entry/sapp DESTINATION .)
install(PROGRAMS bin/r2 DESTINATION .)
diff --git a/service/CMakeLists.txt b/service/CMakeLists.txt
index 4e30779..d41f52a 100644
--- a/service/CMakeLists.txt
+++ b/service/CMakeLists.txt
@@ -5,6 +5,6 @@ else()
configure_file(sapp_default.service.in sapp.service)
endif()
-install(FILES ${CMAKE_BINARY_DIR}/service/sapp.service DESTINATION /usr/lib/systemd/system COMPONENT Program)
+install(FILES ${CMAKE_BINARY_DIR}/service/sapp.service DESTINATION /usr/lib/systemd/system)