From 9c8bb44843bd6f2e1164d53a41fc07bb872e815b Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 31 Aug 2017 02:14:09 +0200 Subject: [PATCH] Fix mingw-w64 targets --- cmake/modules/AppTarget.cmake | 14 +++++++++++--- cmake/modules/LibraryTarget.cmake | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cmake/modules/AppTarget.cmake b/cmake/modules/AppTarget.cmake index 4ebe837..8417807 100644 --- a/cmake/modules/AppTarget.cmake +++ b/cmake/modules/AppTarget.cmake @@ -88,7 +88,7 @@ if(NOT META_NO_INSTALL_TARGETS AND ENABLE_INSTALL_TARGETS) endif() add_dependencies(install-binary ${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}) - # add install target for localization + # add mingw-w64 specific install target if(NOT TARGET install-mingw-w64) add_custom_target(install-mingw-w64) add_dependencies(install-mingw-w64 install-binary) @@ -126,10 +126,18 @@ if(NOT META_NO_INSTALL_TARGETS AND ENABLE_INSTALL_TARGETS) endif() add_dependencies(install-binary-strip ${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}) - # add mingw-w64 specific install target + # 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 ${LOCALIZATION_TARGET}) + 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() diff --git a/cmake/modules/LibraryTarget.cmake b/cmake/modules/LibraryTarget.cmake index 3ecd86e..c6e3c2b 100644 --- a/cmake/modules/LibraryTarget.cmake +++ b/cmake/modules/LibraryTarget.cmake @@ -473,12 +473,12 @@ if(NOT META_NO_INSTALL_TARGETS AND ENABLE_INSTALL_TARGETS) # 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 install-header install-cmake-stuff install-pkg-config) endif() + add_dependencies(install-mingw-w64 install-binary install-header install-cmake-stuff install-pkg-config) if(NOT TARGET install-mingw-w64-strip) add_custom_target(install-mingw-w64-strip) - add_dependencies(install-mingw-w64-strip install-binary-strip install-header install-cmake-stuff install-pkg-config) endif() + add_dependencies(install-mingw-w64-strip install-binary-strip install-header install-cmake-stuff install-pkg-config) if(LOCALIZATION_TARGET) add_dependencies(install-mingw-w64 ${LOCALIZATION_TARGET}) add_dependencies(install-mingw-w64-strip ${LOCALIZATION_TARGET})