Skip to content

Instantly share code, notes, and snippets.

@02JanDal
Created April 21, 2015 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 02JanDal/70a39f2cc3d2002b3588 to your computer and use it in GitHub Desktop.
Save 02JanDal/70a39f2cc3d2002b3588 to your computer and use it in GitHub Desktop.
CMakeLists.txt for Qt translations
set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1)
### translation stuff
file(GLOB TRANSLATION_FILES ${CMAKE_CURRENT_LIST_DIR}/*.ts)
qt5_create_translation(TRANSLATION_MESSAGES ${FILES_TO_TRANSLATE} ${TRANSLATION_FILES})
qt5_add_translation(TRANSLATION_QM ${TRANSLATION_FILES})
add_custom_target(translations_update DEPENDS ${TRANSLATION_MESSAGES})
add_custom_target(translations DEPENDS ${TRANSLATION_QM})
if(APPLE AND UNIX) ## OSX
install(FILES ${TRANSLATION_QM} DESTINATION MultiMC.app/Contents/Resources/translations)
else()
install(FILES ${TRANSLATION_QM} DESTINATION translations)
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment