Only try to install translations if WITHOUT_TRANSLATIONS is unset

develop
tastytea 2018-10-20 22:15:14 +02:00
parent 3874ec8e98
commit 4f6d7477a7
No known key found for this signature in database
GPG Key ID: CFC39497F1B26E07
2 changed files with 3 additions and 4 deletions

View File

@ -38,8 +38,7 @@ target_link_libraries(whyblocked
install(TARGETS whyblocked DESTINATION ${CMAKE_INSTALL_BINDIR}) install(TARGETS whyblocked DESTINATION ${CMAKE_INSTALL_BINDIR})
if(NOT WITHOUT_GUI) if(NOT WITHOUT_GUI)
add_executable(whyblocked-gui src/interface_qt.cpp src/whyblocked.cpp add_executable(whyblocked-gui src/interface_qt.cpp src/whyblocked.cpp)
${QM_FILES})
target_link_libraries(whyblocked-gui target_link_libraries(whyblocked-gui
${LIBXDG_BASEDIR_LIBRARIES} vsqlitepp stdc++fs ${LIBXDG_BASEDIR_LIBRARIES} vsqlitepp stdc++fs
Qt5::Widgets) Qt5::Widgets)
@ -49,8 +48,6 @@ if(NOT WITHOUT_GUI)
${CMAKE_INSTALL_DATAROOTDIR}/applications) ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES de.tastytea.Whyblocked.svg DESTINATION install(FILES de.tastytea.Whyblocked.svg DESTINATION
${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps) ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps)
install(FILES ${QM_FILES} DESTINATION
${CMAKE_INSTALL_DATAROOTDIR}/qt5/translations)
endif() endif()
if(NOT WITHOUT_TRANSLATIONS) if(NOT WITHOUT_TRANSLATIONS)

View File

@ -8,3 +8,5 @@ qt5_add_translation(QM_FILES ${TS_FILES})
add_custom_target(translations ALL DEPENDS ${QM_FILES}) add_custom_target(translations ALL DEPENDS ${QM_FILES})
add_dependencies(${CMAKE_PROJECT_NAME} translations) add_dependencies(${CMAKE_PROJECT_NAME} translations)
add_dependencies(${CMAKE_PROJECT_NAME}-gui translations) add_dependencies(${CMAKE_PROJECT_NAME}-gui translations)
install(FILES ${QM_FILES} DESTINATION
${CMAKE_INSTALL_DATAROOTDIR}/qt5/translations)