From 4f6d7477a703835ac992b9455b6496444bf5616d Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 20 Oct 2018 22:15:14 +0200 Subject: [PATCH] Only try to install translations if WITHOUT_TRANSLATIONS is unset --- CMakeLists.txt | 5 +---- translations/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 175c3c9..3cefddb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,8 +38,7 @@ target_link_libraries(whyblocked install(TARGETS whyblocked DESTINATION ${CMAKE_INSTALL_BINDIR}) if(NOT WITHOUT_GUI) - add_executable(whyblocked-gui src/interface_qt.cpp src/whyblocked.cpp - ${QM_FILES}) + add_executable(whyblocked-gui src/interface_qt.cpp src/whyblocked.cpp) target_link_libraries(whyblocked-gui ${LIBXDG_BASEDIR_LIBRARIES} vsqlitepp stdc++fs Qt5::Widgets) @@ -49,8 +48,6 @@ if(NOT WITHOUT_GUI) ${CMAKE_INSTALL_DATAROOTDIR}/applications) install(FILES de.tastytea.Whyblocked.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps) - install(FILES ${QM_FILES} DESTINATION - ${CMAKE_INSTALL_DATAROOTDIR}/qt5/translations) endif() if(NOT WITHOUT_TRANSLATIONS) diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt index 1d9b507..ef3cdbf 100644 --- a/translations/CMakeLists.txt +++ b/translations/CMakeLists.txt @@ -8,3 +8,5 @@ qt5_add_translation(QM_FILES ${TS_FILES}) add_custom_target(translations ALL DEPENDS ${QM_FILES}) add_dependencies(${CMAKE_PROJECT_NAME} translations) add_dependencies(${CMAKE_PROJECT_NAME}-gui translations) +install(FILES ${QM_FILES} DESTINATION + ${CMAKE_INSTALL_DATAROOTDIR}/qt5/translations)