From 2e2b66e398845ed60c3f4b12cc7ef3f30d8aaa33 Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 27 Jul 2018 16:18:27 +0200 Subject: [PATCH] Add mingw-w64 specific targets only when using mingw-w64 --- cmake/modules/AppTarget.cmake | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/cmake/modules/AppTarget.cmake b/cmake/modules/AppTarget.cmake index 49b4b67..3bbe57f 100644 --- a/cmake/modules/AppTarget.cmake +++ b/cmake/modules/AppTarget.cmake @@ -136,17 +136,19 @@ if(NOT META_NO_INSTALL_TARGETS AND ENABLE_INSTALL_TARGETS) add_dependencies(install-binary-strip ${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}) # add mingw-w64 specific install targets - if(NOT TARGET install-mingw-w64) - add_custom_target(install-mingw-w64) - add_dependencies(install-mingw-w64 install-binary) - endif() - if(NOT TARGET install-mingw-w64-strip) - add_custom_target(install-mingw-w64-strip) - add_dependencies(install-mingw-w64-strip install-binary-strip) - endif() - if(LOCALIZATION_TARGET) - add_dependencies(install-mingw-w64 ${LOCALIZATION_TARGET}) - add_dependencies(install-mingw-w64-strip ${LOCALIZATION_TARGET}) + if(MINGW) + if(NOT TARGET install-mingw-w64) + add_custom_target(install-mingw-w64) + add_dependencies(install-mingw-w64 install-binary) + endif() + if(NOT TARGET install-mingw-w64-strip) + add_custom_target(install-mingw-w64-strip) + add_dependencies(install-mingw-w64-strip install-binary-strip) + endif() + if(LOCALIZATION_TARGET) + add_dependencies(install-mingw-w64 ${LOCALIZATION_TARGET}) + add_dependencies(install-mingw-w64-strip ${LOCALIZATION_TARGET}) + endif() endif() endif()