X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=cmake%2FCREAMacro_FindAndUseLibraries.cmake;h=a2ce726a031fa5929e1fe5ae074305ececd5d413;hb=a19dd400a71fc95b4f264aa9f1d6f976717a22d5;hp=0e3bd098cc098a4b5a8ebe572c6bca3f1bf9a63b;hpb=8733d3f1f61f6e3fb778178655c81b865205402f;p=crea.git diff --git a/cmake/CREAMacro_FindAndUseLibraries.cmake b/cmake/CREAMacro_FindAndUseLibraries.cmake index 0e3bd09..a2ce726 100644 --- a/cmake/CREAMacro_FindAndUseLibraries.cmake +++ b/cmake/CREAMacro_FindAndUseLibraries.cmake @@ -18,6 +18,30 @@ ENDIF(USE_CREA) #----------------------------------------------------------------------------- +#----------------------------------------------------------------------------- +IF(USE_QT4) + IF(NOT QT_FOUND) + + INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseQt.cmake) + #FIND_PACKAGE(Qt4 REQUIRED) + + IF(QT_FOUND) + MESSAGE ( STATUS "=======================================") + MESSAGE ( STATUS "Looking for QT4... found") + MESSAGE ( STATUS "* Inc Dir = ${QT_INCLUDE_DIR}") + MESSAGE ( STATUS "* Version = ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}") + INCLUDE(${QT_USE_FILE}) + + CREA_DEFINE( USE_QT ) + # SET(QT_LIBRARIES + # ${QT_LIBRARIES} + # ) + # MARK_AS_ADVANCED(Qt4_DIR) + ENDIF(QT_FOUND) + ENDIF(NOT QT_FOUND) +ENDIF(USE_QT4) +#----------------------------------------------------------------------------- + #----------------------------------------------------------------------------- IF(USE_VTK) INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseVTK.cmake) @@ -67,6 +91,7 @@ IF(USE_ITK) MESSAGE ( STATUS "Looking for ITK... found") MESSAGE ( STATUS "* Dir = ${ITK_DIR}") MESSAGE ( STATUS "* Version = ${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}") + SET(SKIP_ITK_BUILD_SETTINGS_FILE ON) INCLUDE(${ITK_USE_FILE}) CREA_DEFINE( USE_ITK ) CREA_DEFINE( _USE_ITK_ ) @@ -224,7 +249,8 @@ ENDIF(USE_LATEX) #----------------------------------------------------------------------------- IF(USE_TTH) IF (NOT TTH_EXECUTABLE) - FIND_FILE( TTH_EXECUTABLE NAME tth tth.exe PATHS . $ENV{CREATIS}/tth_exe/ ~/Creatis/tth ~/Creatis/tth_linux) + FIND_FILE( TTH_EXECUTABLE NAME tth tth.exe PATHS . $ENV{CREATIS}/tth_exe/ ~/Creatis/tth ~/Creatis/tth_linux $ENV{TTH}) + IF (NOT TTH_EXECUTABLE) MESSAGE(FATAL_ERROR "TTH not found (LATEX_tth_CONVERTER). Required to build the HTML documentation from tex source") ELSE (NOT TTH_EXECUTABLE) @@ -243,15 +269,47 @@ IF(USE_BOOST) IF(Boost_FOUND) MESSAGE ( STATUS "=======================================") MESSAGE ( STATUS "Looking for boost C++ library... - found in ${Boost_INCLUDE_DIR}") - INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) + INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS} ) + CREA_DEFINE( USE_BOOST ) + IF(WIN32) + LINK_DIRECTORIES( ${Boost_INCLUDE_DIRS}/stage/lib) + #MESSAGE ("EED " ${Boost_LIBRARY_DIRS}) + #libboost_signals-vc71-mt-1_37 + #libboost_filesystem-vc71-mt-1_37 + #boost_date_time-vc71-mt-1_37 + SET(BOOST_LIBRARIES + boost_signals-vc90-mt-1_37 + boost_filesystem-vc90-mt-1_37 + boost_date_time-vc90-mt-1_37 + + #what about boost_thread? JPR + ) + ENDIF(WIN32) IF(NOT WIN32) - SET(BOOST_LIBRARIES - boost_signals - boost_filesystem - ) + IF(NOT APPLE) + SET(BOOST_LIBRARIES + boost_signals + boost_filesystem + boost_date_time + boost_program_options + boost_regex + boost_thread + ) + ELSE(NOT APPLE) + SET(BOOST_LIBRARIES + boost_signals-mt + boost_filesystem-mt + boost_date_time-mt + boost_system-mt + boost_program_options-mt + boost_regex-mt + boost_thread-mt + ) + ENDIF(NOT APPLE) ENDIF(NOT WIN32) + MARK_AS_ADVANCED(Boost_INCLUDE_DIR) ELSE(Boost_FOUND) MESSAGE(FATAL_ERROR "boost C++ library not found - Set Boost_INCLUDE_DIR to the directory containing boost headers")