From 3baa33b916661b139b94f262b429c6a5f0155484 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 14 Jun 2011 20:11:17 +0200 Subject: [PATCH] Added: Option WITH_STATIC_EXTERNAL to force FIND_LIBRARY to find static libs --- code/CMakeModules/nel.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index fbd70c842..d2a5cb014 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -171,6 +171,7 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) OPTION(WITH_STATIC "With static libraries." OFF) ENDIF(WIN32) OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF) + OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF) ### # GUI toolkits @@ -522,6 +523,14 @@ MACRO(SETUP_EXTERNAL) STRING(REGEX REPLACE "VC/bin/.+" "VC" VC_DIR ${CMAKE_CXX_COMPILER}) ENDIF(${CMAKE_MAKE_PROGRAM} MATCHES "Common7") ENDIF(MSVC10) + ELSE(WIN32) + IF(CMAKE_FIND_LIBRARY_SUFFIXES AND NOT APPLE) + IF(WITH_STATIC_EXTERNAL) + SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + ELSE(WITH_STATIC_EXTERNAL) + SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so") + ENDIF(WITH_STATIC_EXTERNAL AND NOT APPLE) + ENDIF(CMAKE_FIND_LIBRARY_SUFFIXES) ENDIF(WIN32) IF(WITH_STLPORT)