summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 48dbe6a80b..7b8cb21f00 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 3f14dc589e..7a03c1975d 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 2779f428d4..ff30c49589 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 6102fa7b6a..80031f4f8d 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 e97b6b13e3..e82d5e9ab1 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)