summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-02-09 20:05:13 (GMT)
committerBrad King <brad.king@kitware.com>2006-02-09 20:05:13 (GMT)
commit33587ce37676c906b7deed07764e2757c6f3997f (patch)
tree995db15982faea296f647f0788cdca9ae8c5e494 /Modules
parent0ddf06e952088c95147312c486da9835f84385b2 (diff)
downloadCMake-33587ce37676c906b7deed07764e2757c6f3997f.zip
CMake-33587ce37676c906b7deed07764e2757c6f3997f.tar.gz
CMake-33587ce37676c906b7deed07764e2757c6f3997f.tar.bz2
ENH: Added platform settings CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES to allow customized searching for libraries.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeGenericSystem.cmake3
-rw-r--r--Modules/Platform/CYGWIN.cmake3
-rw-r--r--Modules/Platform/Darwin.cmake1
-rw-r--r--Modules/Platform/HP-UX.cmake1
-rw-r--r--Modules/Platform/Windows-bcc32.cmake2
-rw-r--r--Modules/Platform/Windows-gcc.cmake5
-rw-r--r--Modules/Platform/Windows.cmake3
7 files changed, 18 insertions, 0 deletions
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index fc2b95d..1ea6e36 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -22,6 +22,9 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
+SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
+
SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
"If set, runtime paths are not added when using shared libraries.")
diff --git a/Modules/Platform/CYGWIN.cmake b/Modules/Platform/CYGWIN.cmake
index 7fd6615..cfd1fb0 100644
--- a/Modules/Platform/CYGWIN.cmake
+++ b/Modules/Platform/CYGWIN.cmake
@@ -6,3 +6,6 @@ SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
+
+SET(CMAKE_FIND_LIBRARY_PREFIXES "cyg" "lib")
+SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a")
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 74caf0b..f6e5946 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -6,6 +6,7 @@ SET(CMAKE_MODULE_EXISTS 1)
SET(CMAKE_DL_LIBS "")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib")
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle")
+SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
IF("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$")
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake
index b2b9e03..6b31509 100644
--- a/Modules/Platform/HP-UX.cmake
+++ b/Modules/Platform/HP-UX.cmake
@@ -1,5 +1,6 @@
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".sl") # .so
SET(CMAKE_DL_LIBS "-ldld")
+SET(CMAKE_FIND_LIBRARY_SUFFIXES ".sl" ".so" ".a")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
diff --git a/Modules/Platform/Windows-bcc32.cmake b/Modules/Platform/Windows-bcc32.cmake
index 72d86b7..f265c64 100644
--- a/Modules/Platform/Windows-bcc32.cmake
+++ b/Modules/Platform/Windows-bcc32.cmake
@@ -16,6 +16,8 @@ SET(CMAKE_SHARED_BUILD_CXX_FLAGS "-tWR")
SET(CMAKE_SHARED_BUILD_C_FLAGS "-tWR")
SET(BORLAND 1)
+SET(CMAKE_FIND_LIBRARY_SUFFIXES "-bcc.lib" ".lib")
+
# uncomment these out to debug makefiles
#SET(CMAKE_START_TEMP_FILE "")
#SET(CMAKE_END_TEMP_FILE "")
diff --git a/Modules/Platform/Windows-gcc.cmake b/Modules/Platform/Windows-gcc.cmake
index 949cc56..779d1e5 100644
--- a/Modules/Platform/Windows-gcc.cmake
+++ b/Modules/Platform/Windows-gcc.cmake
@@ -15,3 +15,8 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
SET(CMAKE_LIBRARY_PATH_FLAG "-L")
SET(CMAKE_LINK_LIBRARY_FLAG "-l")
+
+IF(MINGW)
+ SET(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a")
+ENDIF(MINGW)
diff --git a/Modules/Platform/Windows.cmake b/Modules/Platform/Windows.cmake
index 163d3f6..a79a489 100644
--- a/Modules/Platform/Windows.cmake
+++ b/Modules/Platform/Windows.cmake
@@ -6,6 +6,9 @@ SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
SET(CMAKE_DL_LIBS "")
+SET(CMAKE_FIND_LIBRARY_PREFIXES "")
+SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
+
# for borland make long command lines are redirected to a file
# with the following syntax, see Windows-bcc32.cmake for use
IF(CMAKE_GENERATOR MATCHES "Borland")