summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-02-06 16:15:16 -0500
committerBill Hoffman <bill.hoffman@kitware.com>2009-02-06 16:15:16 -0500
commitd3fc33affd50e108003c66c77dd56500d5d6a3b5 (patch)
treeed9c1572276e7ddc23ce59bc28afc6737584fe9d
parent8cc997e8b8a9bf08f0b1312b9c971780c38ff2e1 (diff)
downloadcmake-d3fc33affd50e108003c66c77dd56500d5d6a3b5.tar.gz
ENH: fix osx bundle re-config issue on branch RC 12
-rw-r--r--CMakeLists.txt2
-rw-r--r--ChangeLog.manual3
-rw-r--r--Modules/FindQt4.cmake31
-rw-r--r--Modules/UseQt4.cmake7
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx26
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx4
-rw-r--r--Source/cmake.cxx22
7 files changed, 81 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d877f3393c..78c8dde0b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -354,7 +354,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6)
SET(CMake_VERSION_PATCH 3)
-SET(CMake_VERSION_RC 11)
+SET(CMake_VERSION_RC 12)
# CVS versions are odd, if this is an odd minor version
# then set the CMake_VERSION_DATE variable
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
diff --git a/ChangeLog.manual b/ChangeLog.manual
index 64d8e2d107..a2988df701 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,3 +1,6 @@
+Changes in CMake 2.6.3 RC 12
+- Fix bug #8465 MACOSX_BUNDLE triggers re-configuration after build
+
Changes in CMake 2.6.3 RC 11
- Fix old-style install to prefix top
- Fix Docs for relative paths in link_directories
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 16ce8451ae..2701f807e6 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -11,6 +11,8 @@
# QT_DONT_USE_QTGUI
# QT_USE_QT3SUPPORT
# QT_USE_QTASSISTANT
+# QT_USE_QAXCONTAINER
+# QT_USE_QAXSERVER
# QT_USE_QTDESIGNER
# QT_USE_QTMOTIF
# QT_USE_QTMAIN
@@ -139,6 +141,8 @@
# QT_QTGUI_FOUND True if QtGui was found.
# QT_QT3SUPPORT_FOUND True if Qt3Support was found.
# QT_QTASSISTANT_FOUND True if QtAssistant was found.
+# QT_QAXCONTAINER_FOUND True if QAxContainer was found (Windows only).
+# QT_QAXSERVER_FOUND True if QAxServer was found (Windows only).
# QT_QTDBUS_FOUND True if QtDBus was found.
# QT_QTDESIGNER_FOUND True if QtDesigner was found.
# QT_QTDESIGNERCOMPONENTS True if QtDesignerComponents was found.
@@ -179,6 +183,8 @@
# QT_INCLUDE_DIR Path to "include" of Qt4
# QT_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support"
# QT_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant"
+# QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only)
+# QT_QAXSERVER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only)
# QT_QTCORE_INCLUDE_DIR Path to "include/QtCore"
# QT_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner"
# QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to "include/QtDesigner"
@@ -214,6 +220,8 @@
#
# QT_QT3SUPPORT_LIBRARY The Qt3Support library
# QT_QTASSISTANT_LIBRARY The QtAssistant library
+# QT_QAXCONTAINER_LIBRARY The QAxContainer library (Windows only)
+# QT_QAXSERVER_LIBRARY The QAxServer library (Windows only)
# QT_QTCORE_LIBRARY The QtCore library
# QT_QTDBUS_LIBRARY The QtDBus library
# QT_QTDESIGNER_LIBRARY The QtDesigner library
@@ -512,6 +520,12 @@ IF (QT4_QMAKE_FOUND)
SET(QT_QTASSISTANT_LIBRARY_DEBUG NOTFOUND)
SET(QT_QTCLUCENE_LIBRARY_RELEASE NOTFOUND)
SET(QT_QTCLUCENE_LIBRARY_DEBUG NOTFOUND)
+ SET(QT_QAXCONTAINER_INCLUDE_DIR NOTFOUND)
+ SET(QT_QAXCONTAINER_LIBRARY_RELEASE NOTFOUND)
+ SET(QT_QAXCONTAINER_LIBRARY_DEBUG NOTFOUND)
+ SET(QT_QAXSERVER_INCLUDE_DIR NOTFOUND)
+ SET(QT_QAXSERVER_LIBRARY_RELEASE NOTFOUND)
+ SET(QT_QAXSERVER_LIBRARY_DEBUG NOTFOUND)
ENDIF(QT_QMAKE_CHANGED)
FOREACH(QT_MODULE ${QT_MODULES})
@@ -524,6 +538,21 @@ IF (QT4_QMAKE_FOUND)
)
ENDFOREACH(QT_MODULE)
+ IF(WIN32)
+ SET(QT_MODULES ${QT_MODULES} QAxContainer QAxServer)
+ # Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR
+ FIND_PATH(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
+ PATHS
+ ${QT_HEADERS_DIR}/ActiveQt
+ NO_DEFAULT_PATH
+ )
+ FIND_PATH(QT_QAXSERVER_INCLUDE_DIR ActiveQt
+ PATHS
+ ${QT_HEADERS_DIR}/ActiveQt
+ NO_DEFAULT_PATH
+ )
+ ENDIF(WIN32)
+
# Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR
FIND_PATH(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
PATHS
@@ -756,6 +785,8 @@ IF (QT4_QMAKE_FOUND)
# platform dependent libraries
IF(WIN32)
_QT4_ADJUST_LIB_VARS(QTMAIN)
+ _QT4_ADJUST_LIB_VARS(QAXSERVER)
+ _QT4_ADJUST_LIB_VARS(QAXCONTAINER)
ENDIF(WIN32)
diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake
index f82ba77d1d..29de8cb539 100644
--- a/Modules/UseQt4.cmake
+++ b/Modules/UseQt4.cmake
@@ -51,11 +51,14 @@ ELSE(QT_QTDBUS_FOUND)
ENDIF(QT_QTDBUS_FOUND)
SET(QT_QTDBUS_MODULE_DEPENDS QTXML QTCORE)
SET(QT_QTXMLPATTERNS_MODULE_DEPENDS QTNETWORK QTCORE)
+SET(QT_QAXCONTAINER_MODULE_DEPENDS QTGUI QTCORE)
+SET(QT_QAXSERVER_MODULE_DEPENDS QTGUI QTCORE)
# Qt modules (in order of dependence)
FOREACH(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
- QTSCRIPT QTSVG QTUITOOLS QTHELP QTWEBKIT PHONON QTGUI QTTEST
- QTDBUS QTXML QTSQL QTXMLPATTERNS QTNETWORK QTCORE)
+ QAXSERVER QAXCONTAINER QTSCRIPT QTSVG QTUITOOLS QTHELP
+ QTWEBKIT PHONON QTGUI QTTEST QTDBUS QTXML QTSQL QTXMLPATTERNS
+ QTNETWORK QTCORE)
IF (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
IF (QT_${module}_FOUND)
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index c72ff184a2..bad299cd5c 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -352,18 +352,26 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
cmakefileStream << " \"" <<
lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str()
<< "\"\n";
- const std::vector<std::string>& outfiles =
- lg->GetMakefile()->GetOutputFiles();
- for(std::vector<std::string>::const_iterator k= outfiles.begin();
- k != outfiles.end(); ++k)
- {
- cmakefileStream << " \"" <<
- lg->Convert(k->c_str(),cmLocalGenerator::HOME_OUTPUT).c_str()
- << "\"\n";
- }
}
cmakefileStream << " )\n\n";
+ // CMake must rerun if a byproduct is missing.
+ {
+ cmakefileStream
+ << "# Byproducts of CMake generate step:\n"
+ << "SET(CMAKE_MAKEFILE_PRODUCTS\n";
+ const std::vector<std::string>& outfiles =
+ lg->GetMakefile()->GetOutputFiles();
+ for(std::vector<std::string>::const_iterator k = outfiles.begin();
+ k != outfiles.end(); ++k)
+ {
+ cmakefileStream << " \"" <<
+ lg->Convert(k->c_str(),cmLocalGenerator::HOME_OUTPUT).c_str()
+ << "\"\n";
+ }
+ cmakefileStream << " )\n\n";
+ }
+
this->WriteMainCMakefileLanguageRules(cmakefileStream,
this->LocalGenerators);
}
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 848ae20dc2..9477ebfe87 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -476,8 +476,8 @@ cmMakefileExecutableTargetGenerator::CreateAppBundle(std::string& targetName,
outpath = this->MacContentDirectory;
outpath += "MacOS";
cmSystemTools::MakeDirectory(outpath.c_str());
+ this->Makefile->AddCMakeOutputFile(outpath.c_str());
outpath += "/";
- this->Makefile->AddCMakeDependFile(outpath.c_str());
// Configure the Info.plist file. Note that it needs the executable name
// to be set.
@@ -485,5 +485,5 @@ cmMakefileExecutableTargetGenerator::CreateAppBundle(std::string& targetName,
this->LocalGenerator->GenerateAppleInfoPList(this->Target,
targetName.c_str(),
plist.c_str());
- this->Makefile->AddCMakeDependFile(plist.c_str());
+ this->Makefile->AddCMakeOutputFile(plist.c_str());
}
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 6b782b36de..697eca6cce 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2654,6 +2654,28 @@ int cmake::CheckBuildSystem()
}
}
+ // If any byproduct of makefile generation is missing we must re-run.
+ std::vector<std::string> products;
+ if(const char* productStr = mf->GetDefinition("CMAKE_MAKEFILE_PRODUCTS"))
+ {
+ cmSystemTools::ExpandListArgument(productStr, products);
+ }
+ for(std::vector<std::string>::const_iterator pi = products.begin();
+ pi != products.end(); ++pi)
+ {
+ if(!(cmSystemTools::FileExists(pi->c_str()) ||
+ cmSystemTools::FileIsSymlink(pi->c_str())))
+ {
+ if(verbose)
+ {
+ cmOStringStream msg;
+ msg << "Re-run cmake, missing byproduct: " << *pi << "\n";
+ cmSystemTools::Stdout(msg.str().c_str());
+ }
+ return 1;
+ }
+ }
+
// Get the set of dependencies and outputs.
std::vector<std::string> depends;
std::vector<std::string> outputs;