From: user Date: Tue, 14 Jan 2020 17:29:30 +0000 (+0100) Subject: cmake: don't mangle in-source .qrc file X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=989d50ad39d030bcb5df3869ec9b94d6a9e878d9 cmake: don't mangle in-source .qrc file Only copy the .qrc file for out-of-source builds. For in-source builds the file is already present, and not touching it avoids data loss. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ff052ce1..38252fdd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -429,7 +429,9 @@ qt5_add_resources(pulseview_RESOURCES_RCC ${pulseview_RESOURCES}) file(GLOB TS_FILES ${CMAKE_SOURCE_DIR}/l10n/*.ts) set_property(SOURCE ${TS_FILES} PROPERTY OUTPUT_LOCATION ${CMAKE_BINARY_DIR}/l10n) -configure_file("translations.qrc" "translations.qrc" COPYONLY) +if (NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) + configure_file("translations.qrc" "translations.qrc" COPYONLY) +endif () qt5_add_translation(QM_FILES ${TS_FILES}) qt5_create_translation(QM_FILES ${pulseview_SOURCES} ${TS_FILES})