Added: Option WITH_STATIC_EXTERNAL to force FIND_LIBRARY to find static libs

hg/feature/gsoc2012-fabien
kervala 14 years ago
parent d52dead6af
commit 75ce27ad45

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

Loading…
Cancel
Save