From a13716a5dc1277d46beebffe6304214c22cf6ae3 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Sat, 5 Aug 2017 14:37:03 +0200 Subject: Autogen: Enable per-config support Enables the AUTOGEN per-config include directories and wrapper sources for multi configuration generators. Closes #16460 --- Source/cmQtAutoGeneratorInitializer.cxx | 10 ---------- Tests/QtAutoUicInterface/CMakeLists.txt | 5 +++-- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 1c0d4c3..5a06730 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -158,16 +158,6 @@ static void GetCompileDefinitionsAndDirectories( static bool IsMultiConfig(cmGlobalGenerator* globalGen) { - // FIXME: Xcode does not support per-config sources, yet. - // (EXCLUDED_SOURCE_FILE_NAMES) - // Treat it as a single configuration generator meanwhile. - if (globalGen->GetName().find("Xcode") != std::string::npos) { - return false; - } - // FIXME: Visual Studio does not fully support per-config sources yet. - if (globalGen->GetName().find("Visual Studio") != std::string::npos) { - return false; - } return globalGen->IsMultiConfig(); } diff --git a/Tests/QtAutoUicInterface/CMakeLists.txt b/Tests/QtAutoUicInterface/CMakeLists.txt index 3ea1294..a5c2d99 100644 --- a/Tests/QtAutoUicInterface/CMakeLists.txt +++ b/Tests/QtAutoUicInterface/CMakeLists.txt @@ -53,8 +53,9 @@ set_property(TARGET KI18n APPEND PROPERTY # END upstream -if(${CMAKE_GENERATOR} MATCHES "Visual Studio") -set(INC_DIR "include_${CMAKE_BUILD_TYPE}" ) +get_property(_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(_GENERATOR_IS_MULTI_CONFIG) +set(INC_DIR "include_$" ) else() set(INC_DIR "include" ) endif() -- cgit v0.12