Added: Option WITH_STATIC_EXTERNAL to force FIND_LIBRARY to find static libs

This commit is contained in:
kervala 2011-06-14 20:11:17 +02:00
parent d0987263bd
commit a640676140

View file

@ -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)