diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-02-03 14:26:36 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-02-03 14:26:36 (GMT) |
commit | 59adb4eabe6881cd29bc2470ad63b54d8527039e (patch) | |
tree | 3b2fde18743775a83bd5d9d94eaf0daf664a2a34 | |
parent | c06828a4a0e419b6d3ab5bd0f885ce507ee382b7 (diff) | |
download | CMake-59adb4eabe6881cd29bc2470ad63b54d8527039e.zip CMake-59adb4eabe6881cd29bc2470ad63b54d8527039e.tar.gz CMake-59adb4eabe6881cd29bc2470ad63b54d8527039e.tar.bz2 |
ENH: Fix ADD_DEPENDENCIES on Unix makefiles and fix SimpleInstall test not to link the module
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 11 | ||||
-rw-r--r-- | Tests/SimpleInstall/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/SimpleInstallS2/CMakeLists.txt | 4 |
3 files changed, 16 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 2dc584a..0350592 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -1603,7 +1603,16 @@ void cmLocalUnixMakefileGenerator::OutputDependLibs(std::ostream& fout) if(emitted.insert(*util).second) { // Output this dependency. - this->OutputExeDepend(fout, util->c_str()); + std::string utilType = *util + "_LIBRARY_TYPE"; + const char* libType = m_Makefile->GetDefinition(utilType.c_str()); + if ( libType ) + { + this->OutputLibDepend(fout, util->c_str()); + } + else + { + this->OutputExeDepend(fout, util->c_str()); + } } } fout << "\n"; diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index d87ec48..ede22c1 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -9,7 +9,9 @@ ADD_LIBRARY(test1 STATIC lib1.cxx) ADD_LIBRARY(test2 SHARED lib2.cxx) ADD_LIBRARY(test3 MODULE lib3.cxx) ADD_EXECUTABLE (SimpleInstall inst.cxx foo.c foo.h) -TARGET_LINK_LIBRARIES(SimpleInstall test1 test2 test3) +TARGET_LINK_LIBRARIES(SimpleInstall test1 test2) + +ADD_DEPENDENCIES(SimpleInstall test3) INSTALL_TARGETS(/bin SimpleInstall) INSTALL_TARGETS(/lib test1 test2 test3) diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index d87ec48..ede22c1 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/CMakeLists.txt @@ -9,7 +9,9 @@ ADD_LIBRARY(test1 STATIC lib1.cxx) ADD_LIBRARY(test2 SHARED lib2.cxx) ADD_LIBRARY(test3 MODULE lib3.cxx) ADD_EXECUTABLE (SimpleInstall inst.cxx foo.c foo.h) -TARGET_LINK_LIBRARIES(SimpleInstall test1 test2 test3) +TARGET_LINK_LIBRARIES(SimpleInstall test1 test2) + +ADD_DEPENDENCIES(SimpleInstall test3) INSTALL_TARGETS(/bin SimpleInstall) INSTALL_TARGETS(/lib test1 test2 test3) |