CMakeLists.txt

changeset 10
e249d97c7fe6
parent 8
44679e468ba9
child 14
20d2ed3af73d
--- a/CMakeLists.txt	Sun Nov 03 12:56:42 2019 +0200
+++ b/CMakeLists.txt	Sun Nov 03 13:07:04 2019 +0200
@@ -80,7 +80,7 @@
 # Translations
 qt5_create_translation(QM_FILES ${LDFORGE_SOURCES} ${LDFORGE_HEADERS} ${LDFORGE_FORMS} ${LDFORGE_LOCALES})
 add_custom_target(translations ALL DEPENDS ${QM_FILES})
-add_custom_target(resources ALL DEPENDS ${RESOURCE_FILES})
+add_custom_target(resources ALL DEPENDS ${LDFORGE_RESOURCES})
 add_dependencies(resources translations)
 
 set(CMAKE_CXX_STANDARD 17)
@@ -103,8 +103,9 @@
 # Move languages.qrc into the build directory to bake the .qm-files into LDForge
 # so that they don't have to be shipped separately
 # https://stackoverflow.com/a/34798124
+# https://gist.github.com/giraldeau/546ba5512a74dfe9d8ea0862d66db412
 set(LANGUAGES_QRC "languages.qrc")
-configure_file(${LANGUAGES_QRC} ${LANGUAGES_QRC} COPYONLY)
+configure_file(${LANGUAGES_QRC} ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
 qt5_add_resources(LDFORGE_QM_RC_FILE ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGES_QRC})
 
 add_executable(ldforge WIN32

mercurial