From e51246d3c7c621c33ea8ab55bf716a6490377c9d Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Mon, 31 May 2010 12:27:50 +0000 Subject: [PATCH] * ./hurricane: - Change: When static linking is required, also switch Boost libraries in static mode. Automatically done is modules using FindHURRICANE through SET_LIB_LINK_MODE(). Note: FindBoost must be called *after* SET_LIB_LINK_MODE(). --- hurricane/CMakeLists.txt | 27 ++++++++++++--------- hurricane/cmake_modules/FindHURRICANE.cmake | 2 ++ 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/hurricane/CMakeLists.txt b/hurricane/CMakeLists.txt index 3b154cc0..116a590d 100644 --- a/hurricane/CMakeLists.txt +++ b/hurricane/CMakeLists.txt @@ -33,6 +33,18 @@ LIST(INSERT CMAKE_MODULE_PATH 0 "${HURRICANE_SOURCE_DIR}/cmake_modules/") OPTION(BUILD_DOC "Build the documentation (doxygen)" OFF) +SET(QT_USE_QTXML "true") +#SET(QT_USE_QTOPENGL "true") + +FIND_PACKAGE(Qt4 REQUIRED) # find and setup Qt4 for this project +FIND_PACKAGE(BISON REQUIRED) +FIND_PACKAGE(FLEX REQUIRED) +FIND_PACKAGE(PythonLibs REQUIRED) +FIND_PACKAGE(PythonSitePackages REQUIRED) +IF(BUILD_DOC) + FIND_PACKAGE(Doxygen) +ENDIF(BUILD_DOC) + #SET_LIB_LINK_MODE() IF(NOT BUILD_SHARED_LIBS) # check for qmake @@ -41,22 +53,15 @@ IF(NOT BUILD_SHARED_LIBS) NO_DEFAULT_PATH ) MESSAGE(STATUS "Building static libraries.") + IF(Boost_FOUND) + SET(Boost_USE_STATIC_LIBS ON) + MESSAGE(STATUS "Using Boost static libraries.") + ENDIF(Boost_FOUND) ELSE(NOT BUILD_SHARED_LIBS) MESSAGE(STATUS "Building dynamic libraries.") ENDIF(NOT BUILD_SHARED_LIBS) -SET(QT_USE_QTXML "true") -#SET(QT_USE_QTOPENGL "true") - -FIND_PACKAGE(Qt4 REQUIRED) # find and setup Qt4 for this project -FIND_PACKAGE(BISON REQUIRED) -FIND_PACKAGE(FLEX REQUIRED) FIND_PACKAGE(Boost 1.33.1 COMPONENTS regex REQUIRED) -FIND_PACKAGE(PythonLibs REQUIRED) -FIND_PACKAGE(PythonSitePackages REQUIRED) -IF(BUILD_DOC) - FIND_PACKAGE(Doxygen) -ENDIF(BUILD_DOC) ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(cmake_modules) diff --git a/hurricane/cmake_modules/FindHURRICANE.cmake b/hurricane/cmake_modules/FindHURRICANE.cmake index ea8fb81d..c6b4d5ef 100644 --- a/hurricane/cmake_modules/FindHURRICANE.cmake +++ b/hurricane/cmake_modules/FindHURRICANE.cmake @@ -47,6 +47,8 @@ MACRO(SET_LIB_LINK_MODE) /opt/qt4-static-4.3.2/bin NO_DEFAULT_PATH ) + SET(Boost_USE_STATIC_LIBS ON) + MESSAGE(STATUS "Using Boost static libraries.") MESSAGE(STATUS "Building static libraries.") ELSE(NOT BUILD_SHARED_LIBS) MESSAGE(STATUS "Building dynamic libraries.")