summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-11-30 23:13:49 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-11-30 23:13:49 (GMT)
commit58f670327c08d8cb187da83f81e87715063546f3 (patch)
treea5e64b5ac4d2b16262983539021c0b2bbfdd2b05
parent3dca9a681f247c3b5b51ef43833e3ed9529a3943 (diff)
downloadCMake-58f670327c08d8cb187da83f81e87715063546f3.zip
CMake-58f670327c08d8cb187da83f81e87715063546f3.tar.gz
CMake-58f670327c08d8cb187da83f81e87715063546f3.tar.bz2
ENH: move to RC 3 and add a fix for -L/path in link commands that was broken by the .dll.lib fix
-rw-r--r--CMakeLists.txt2
-rw-r--r--ChangeLog.manual4
-rw-r--r--Source/cmOrderLinkDirectories.cxx13
-rw-r--r--Source/cmTarget.cxx9
-rw-r--r--Tests/LibName/CMakeLists.txt5
5 files changed, 23 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48dbe6a..7b8cb21 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@ SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 4)
SET(CMake_VERSION_PATCH 5)
# for an actual release this should not be defined
-SET(CMake_VERSION_RC 2)
+SET(CMake_VERSION_RC 3)
SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
diff --git a/ChangeLog.manual b/ChangeLog.manual
index 3f14dc5..7a03c19 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,6 +1,8 @@
Changes in CMake 2.4.5
+* Fix fix for foo.dll.lib that does not brea -L/usr/lib in link names
+
* Fix problem with LIBRARY_OUTPUT_PATH and linking to a dll foo.dll.lib
- instead of foo.lib
+ instead of foo.lib
* Do not depend on optimized libraries for a debug build and visa versa.
diff --git a/Source/cmOrderLinkDirectories.cxx b/Source/cmOrderLinkDirectories.cxx
index 2779f42..ff30c49 100644
--- a/Source/cmOrderLinkDirectories.cxx
+++ b/Source/cmOrderLinkDirectories.cxx
@@ -463,17 +463,16 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
#ifdef CM_ORDER_LINK_DIRECTORIES_DEBUG
fprintf(stderr, "Raw link item [%s]\n", this->RawLinkItems[i].c_str());
#endif
- // check to see if the file is a full path or just contains
- // a / in it and is a path to something
+ // if it is a full path to an item then separate it from the path
+ // this only works with files and paths
cmStdString& item = this->RawLinkItems[i];
- if(cmSystemTools::FileIsFullPath(item.c_str())
- || item.find("/") != item.npos)
+ if(cmSystemTools::FileIsFullPath(item.c_str()))
{
- if(cmSystemTools::FileIsDirectory(this->RawLinkItems[i].c_str()))
+ if(cmSystemTools::FileIsDirectory(item.c_str()))
{
- if(cmSystemTools::IsPathToFramework(this->RawLinkItems[i].c_str()))
+ if(cmSystemTools::IsPathToFramework(item.c_str()))
{
- this->SplitFramework.find(this->RawLinkItems[i]);
+ this->SplitFramework.find(item.c_str());
cmStdString path = this->SplitFramework.match(1);
// Add the -F path if we have not yet done so
if(this->EmittedFrameworkPaths.insert(path).second)
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 6102fa7..80031f4 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -894,7 +894,14 @@ const char* cmTarget::GetDirectory(const char* config)
{
this->Directory = this->Makefile->GetStartOutputDirectory();
}
-
+ // if LIBRARY_OUTPUT_PATH or EXECUTABLE_OUTPUT_PATH was relative
+ // then make them full paths because this directory MUST
+ // be a full path or things will not work!!!
+ if(!cmSystemTools::FileIsFullPath(this->Directory.c_str()))
+ {
+ this->Directory = this->Makefile->GetCurrentOutputDirectory() +
+ std::string("/") + this->Directory;
+ }
if(config)
{
// Add the configuration's subdirectory.
diff --git a/Tests/LibName/CMakeLists.txt b/Tests/LibName/CMakeLists.txt
index e97b6b1..e82d5e9 100644
--- a/Tests/LibName/CMakeLists.txt
+++ b/Tests/LibName/CMakeLists.txt
@@ -1,4 +1,6 @@
project(LibName)
+# this is a test to make sure that relative path
+# LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH work
set(LIBRARY_OUTPUT_PATH lib)
set(EXECUTABLE_OUTPUT_PATH lib)
add_library(bar SHARED bar.c)
@@ -6,3 +8,6 @@ add_library(foo SHARED foo.c)
target_link_libraries(foo bar)
add_executable(foobar foobar.c)
target_link_libraries(foobar foo)
+IF(UNIX)
+ target_link_libraries(foobar -L/usr/local/lib)
+ENDIF(UNIX)