From b60bada2cf8ffb32d549a7c6b84721faa93ae470 Mon Sep 17 00:00:00 2001 From: gesangtome Date: Sat, 23 Oct 2021 23:19:06 +0800 Subject: [PATCH] Add flag CMAKE_INSTALL_PREFIX for translation and desktop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Although the flag -DCMAKE_INSTALL_PREFIX has been passed in the shell, it is not used in the installation of ‘’.desktop’’ and ‘translation’’. By explicitly setting CMAKE_INSTALL_PREFIX, this will make'make' the correct installation file to the specified directory. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 615a832..89251ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,8 +104,8 @@ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES cutefish-settings.desktop - DESTINATION /usr/share/applications/ + DESTINATION ${CMAKE_INSTALL_PREFIX}/usr/share/applications/ COMPONENT Runtime ) -install(FILES ${QM_FILES} DESTINATION /usr/share/${PROJECT_NAME}/translations) +install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/usr/share/${PROJECT_NAME}/translations)