MACRO(CREA_FIND_AND_USE_LIBRARIES)
-#MESSAGE(ERROR "EED CREAMacrp_FindAndUseLibraries")
+
+IF(INCLUDE_CTEST)
+ include(CTest)
+ENDIF(INCLUDE_CTEST)
+
+
set(USE_DEBUG_LIB "" CACHE BOOL "Use Debug Libraries" )
#-----------------------------------------------------------------------------
)
ENDIF(USE_VTK)
ENDIF(USE_GDCM_VTK)
-
+
+ ELSE(GDCM_FOUND)
+ MESSAGE(FATAL_ERROR "GDCM not found....")
ENDIF(GDCM_FOUND)
+
ENDIF(NOT GDCM_FOUND)
ENDIF(USE_GDCM)
# Test that GDCM_NAME_SPACE is **NOT** "gdcm" or will conflict with
# embedded gdcm in ITK and will result in hard seg faults !
-
+ INCLUDE_DIRECTORIES(${GDCM_INCLUDE_DIR})
+ LINK_DIRECTORIES( ${GDCM_LIBRARY_DIR})
SET(GDCM2_LIBRARIES
${GDCM_LIBRARIES}
IF(USE_GDCM_VTK)
IF(USE_VTK)
- SET(GDCM_LIBRARIES
- ${GDCM_LIBRARIES}
- vtkgdcm
- gdcm2vtk
- )
+ IF(WIN32)
+ SET(GDCM_LIBRARIES
+ ${GDCM_LIBRARIES}
+ vtkgdcm
+ #gdcm2vtk
+ )
+ ELSE(WIN32)
+ SET(GDCM_LIBRARIES
+ ${GDCM_LIBRARIES}
+ vtkgdcm
+ )
+ ENDIF(WIN32)
+
ENDIF(USE_VTK)
ENDIF(USE_GDCM_VTK)
-
+
ENDIF(USE_GDCM2)
ENDIF(NOT TTH_EXECUTABLE)
ENDIF(USE_TTH)
#-----------------------------------------------------------------------------
-
#-----------------------------------------------------------------------------
IF(USE_BOOST)
+message(STATUS "1")
IF(NOT Boost_FOUND)
- FIND_PACKAGE(Boost REQUIRED)
+ FIND_PACKAGE(Boost COMPONENTS filesystem signals date_time regex REQUIRED)
IF(Boost_FOUND)
+ message(STATUS "1 bis")
MESSAGE ( STATUS "=======================================")
MESSAGE ( STATUS "Looking for boost C++ library... - found in ${Boost_INCLUDE_DIR}")
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
- LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS} )
-
- CREA_DEFINE( USE_BOOST )
+ LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS})
IF(WIN32)
+ message("creamacro find and use lib = ${Boost_LIBRARIES}")
+
+
+ CREA_DEFINE( USE_BOOST )
- LINK_DIRECTORIES( ${Boost_INCLUDE_DIRS}/Bin/lib)
- #message("creamacro find and use lib = ${Boost_SIGNALS_LIBRARY}")
- IF(USE_DEBUG_LIB)
- SET(BOOST_LIBRARIES
- boost_signals-vc90-mt-gd-1_40
- boost_filesystem-vc90-mt-gd-1_40
- boost_date_time-vc90-mt-gd-1_40
- #what about boost_thread? JPR
+ SET(BOOST_LIBRARIES
+ ${Boost_LIBRARIES}
)
- ELSE(NOT USE_DEBUG_LIB)
- SET(BOOST_LIBRARIES
- boost_signals-vc90-mt-1_40
- boost_filesystem-vc90-mt-1_40
- boost_date_time-vc90-mt-1_40
- )
- ENDIF(USE_DEBUG_LIB)
+# FCY with cmake boost, it's useless.
+# But if it is not working, uncomment
+#
+# IF(USE_DEBUG_LIB)
+# SET(BOOST_LIBRARIES
+# boost_signals-vc90-mt-gd-1_40
+# boost_filesystem-vc90-mt-gd-1_40
+# boost_date_time-vc90-mt-gd-1_40
+# #what about boost_thread? JPR
+# )
+# ELSE(NOT USE_DEBUG_LIB)
+# SET(BOOST_LIBRARIES
+# boost_signals-vc90-mt-1_40
+# boost_filesystem-vc90-mt-1_40
+# boost_date_time-vc90-mt-1_40
+# )
+# ENDIF(USE_DEBUG_LIB)
ENDIF(WIN32)
IF(NOT WIN32)
+
SET(BOOST_LIBRARIES
boost_signals-mt
boost_filesystem-mt
)
ENDIF(NOT WIN32)
- MARK_AS_ADVANCED(Boost_INCLUDE_DIR)
+ MARK_AS_ADVANCED(Boost_INCLUDE_DIR)
+ MARK_AS_ADVANCED(Boost_LIBRARY_DIRS)
+
ELSE(Boost_FOUND)
- MESSAGE(FATAL_ERROR "boost C++ library not found - Set Boost_INCLUDE_DIR to the directory containing boost headers")
+ message(STATUS "2")
+ MESSAGE( "boost C++ library not found - Set Boost_INCLUDE_DIR to the directory containing boost headers")
ENDIF(Boost_FOUND)
ENDIF(NOT Boost_FOUND)
+ message("${Boost_FOUND}")
+
+
ENDIF(USE_BOOST)
-#-----------------------------------------------------------------------------
+#-----------------------------------------------------------
IF(USE_XERCES)
IF(WIN32)
SET(XERCES_LIB_DIR $ENV{XERCES_DIR})
-
+
IF(NOT XERCES_LIB_DIR)
MESSAGE(FATAL_ERROR "XERCES_DIR not found")
ELSE(NOT XERCES_LIB_DIR)
IF(UNIX)
-
- SET(XERCES_LIBRARIES libxerces-c.so )
- INCLUDE_DIRECTORIES( /usr/local/include )
- LINK_DIRECTORIES( /usr/local/lib )
- #FIND_PACKAGE(Xerces)
- # Use if found
- #IF(Xerces_FOUND)
- # INCLUDE_DIRECTORIES( ${XERCES_INCLUDE_DIR} )
- #ENDIF(Xerces_FOUND)
- ENDIF(UNIX)
-
-
+ IF(APPLE)
+ SET(XERCES_LIBRARIES xerces-c )
+ INCLUDE_DIRECTORIES( /opt/local/include )
+ LINK_DIRECTORIES( /opt/local/lib )
+ ELSEIF(APPLE)
+ SET(XERCES_LIBRARIES libxerces-c.so )
+ INCLUDE_DIRECTORIES( /usr/local/include )
+ LINK_DIRECTORIES( /usr/local/lib /usr/lib)
+ #FIND_PACKAGE(Xerces)
+ # Use if found
+ #IF(Xerces_FOUND)
+ # INCLUDE_DIRECTORIES( ${XERCES_INCLUDE_DIR} )
+ #ENDIF(Xerces_FOUND)
+ ENDIF(APPLE)
+ ENDIF(UNIX)
ENDIF(USE_XERCES)