summaryrefslogtreecommitdiffstats
path: root/Tests/Complex/CMakeLists.txt
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-02-22 21:21:48 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-02-22 21:21:48 (GMT)
commitbada88e8e45640afa5ef063aeab180fd6f1cfee4 (patch)
tree65e489a11a6014b756ab8d8b86df584ac3eb2bcc /Tests/Complex/CMakeLists.txt
parent54bd175eea66704a879fc72278cdbb49efdd801c (diff)
parent8233636dbe531ccf36510242e7c997dfa6529bde (diff)
downloadCMake-bada88e8e45640afa5ef063aeab180fd6f1cfee4.zip
CMake-bada88e8e45640afa5ef063aeab180fd6f1cfee4.tar.gz
CMake-bada88e8e45640afa5ef063aeab180fd6f1cfee4.tar.bz2
Merge branch 'target-include-directories' into ninja-generator
Diffstat (limited to 'Tests/Complex/CMakeLists.txt')
-rw-r--r--Tests/Complex/CMakeLists.txt32
1 files changed, 31 insertions, 1 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index b505019..ec3ad39 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -199,7 +199,9 @@ CONFIGURE_FILE(
${Complex_SOURCE_DIR}/Library/dummy
${Complex_BINARY_DIR}/Library/dummylib.lib
COPYONLY IMMEDIATE)
-FOREACH (ext ${CMAKE_SHLIB_SUFFIX};.so;.a;.sl)
+FOREACH (ext ${CMAKE_SHLIB_SUFFIX};.so;.a;.sl
+ ${CMAKE_SHARED_LIBRARY_SUFFIX}.2
+ ${CMAKE_STATIC_LIBRARY_SUFFIX}.2)
CONFIGURE_FILE(
${Complex_SOURCE_DIR}/Library/dummy
${Complex_BINARY_DIR}/Library/libdummylib${ext}
@@ -216,6 +218,34 @@ FIND_LIBRARY(FIND_DUMMY_LIB
PATHS
${Complex_BINARY_DIR}/Library DOC "find dummy lib")
+# This doesn't work for platforms that have a shared library and an import
+# library, like Windows with .dll and .lib. Limit is to ".so" now because it's
+# known to work there.
+IF(CMAKE_SHARED_LIBRARY_SUFFIX STREQUAL ".so")
+ FIND_LIBRARY(FIND_DUMMY_SHLIB_VERSIONED
+ NAMES libdummylib${CMAKE_SHARED_LIBRARY_SUFFIX}.2
+ PATHS ${Complex_BINARY_DIR}/Library
+ DOC "find versioned dummy shared lib"
+ NO_DEFAULT_PATH)
+
+ IF(NOT FIND_DUMMY_SHLIB_VERSIONED MATCHES "/libdummylib${CMAKE_SHARED_LIBRARY_SUFFIX}.2")
+ MESSAGE(SEND_ERROR "FIND_DUMMY_SHLIB_VERSIONED is not set correctly: "
+ "${FIND_DUMMY_SHLIB_VERSIONED}")
+ ENDIF()
+ENDIF()
+
+# Static library, should work everywhere
+FIND_LIBRARY(FIND_DUMMY_STLIB_VERSIONED
+ NAMES libdummylib${CMAKE_STATIC_LIBRARY_SUFFIX}.2
+ PATHS ${Complex_BINARY_DIR}/Library
+ DOC "find versioned dummy static lib"
+ NO_DEFAULT_PATH)
+
+IF(NOT FIND_DUMMY_STLIB_VERSIONED MATCHES "/libdummylib${CMAKE_STATIC_LIBRARY_SUFFIX}.2")
+ MESSAGE(SEND_ERROR "FIND_DUMMY_STLIB_VERSIONED is not set correctly: "
+ "${FIND_DUMMY_STLIB_VERSIONED}")
+ENDIF()
+
#
# Test SET_SOURCE_FILES_PROPERTIES
#