From 627f13043b7ba3ac0efe8e9abdf2797c6276af6a Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sat, 4 May 2024 22:38:42 -0500 Subject: [PATCH] Only add targets to the qt folder if they exist --- scwx-qt/scwx-qt.cmake | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index 7e5f8f72..cda6c7f2 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -501,11 +501,18 @@ qt_add_translations(scwx-qt TS_FILES ${TS_FILES} INCLUDE_DIRECTORIES true LUPDATE_OPTIONS -locations none -no-ui-lines) -set_target_properties(release_translations PROPERTIES FOLDER qt) -set_target_properties(scwx-qt_lrelease PROPERTIES FOLDER qt) -set_target_properties(scwx-qt_lupdate PROPERTIES FOLDER qt) -set_target_properties(scwx-qt_other_files PROPERTIES FOLDER qt) - +if (TARGET update_translations) + set_target_properties(release_translations PROPERTIES FOLDER qt) +endif() +if (TARGET scwx-qt_lrelease) + set_target_properties(scwx-qt_lrelease PROPERTIES FOLDER qt) +endif() +if (TARGET scwx-qt_lupdate) + set_target_properties(scwx-qt_lupdate PROPERTIES FOLDER qt) +endif() +if (TARGET scwx-qt_other_files) + set_target_properties(scwx-qt_other_files PROPERTIES FOLDER qt) +endif() if (TARGET update_translations) set_target_properties(update_translations PROPERTIES FOLDER qt) endif()