summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBob Friesenhahn <bfriesen@simple.dallas.tx.us>2015-08-29 15:30:28 +0000
committerBob Friesenhahn <bfriesen@simple.dallas.tx.us>2015-08-29 15:30:28 +0000
commitbcf0cb43f4c98e18cb5dc1f2d452eab547ef54bd (patch)
treec25ffa3bad45467c2dce413c2f9ab7c3da4b84ac /CMakeLists.txt
parent036132130dbaab641dd1175c9c97934c16da9797 (diff)
downloadlibtiff-git-bcf0cb43f4c98e18cb5dc1f2d452eab547ef54bd.tar.gz
Add ld-version-script option to cmake build.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 25e45c16..c6e0c40f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -153,6 +153,7 @@ if(MSVC)
set(CMAKE_DEBUG_POSTFIX "d")
endif()
+option(ld-version-script "Enable linker version script" ON)
# Check if LD supports linker scripts.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 {
global: sym;
@@ -167,7 +168,7 @@ set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script=${CMAKE_C
check_c_source_compiles("int main(void){return 0;}" HAVE_LD_VERSION_SCRIPT)
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
-if (HAVE_LD_VERSION_SCRIPT)
+if (ld-version-script AND HAVE_LD_VERSION_SCRIPT)
set(HAVE_LD_VERSION_SCRIPT TRUE)
else()
set(HAVE_LD_VERSION_SCRIPT FALSE)