CREA_PREVENT_IN_SOURCE_BUILD()
+
SET(USE_BOOST ON)
OPTION(CREA_BUILD_VTK "Build crea with vtk ?" OFF)
)
#-----------------------------------------------------------------------------
# messages compilation options
-OPTION ( CREA_COMPILE_DEBUG_MESSAGES "Compile CREA debug messages ?" OFF)
+
+OPTION ( CREA_COMPILE_DEBUG_MESSAGES "Compile CREA debug messages ?" USE_DEBUG_LIB)
OPTION ( CREA_COMPILE_ERROR_MESSAGES "Compile CREA error messages ?" ON)
OPTION ( CREA_COMPILE_MESSAGES "Compile CREA messages ?" ON)
OPTION ( CREA_COMPILE_WARNING_MESSAGES "Compile CREA warning messages ?" ON)
MACRO(CREA_FIND_AND_USE_LIBRARIES)
-OPTION(DEBUG "Use debug libraries" ON)
+
+set(USE_DEBUG_LIB "" CACHE BOOL "Use Debug Libraries" )
+
#-----------------------------------------------------------------------------
# If one can invoke this macro then crea has already been found !!
# However if one whishes to link against crea and crea was built
#-----------------------------------------------------------------------------
IF(USE_ITK)
- IF(NOT ITK_FOUND)
+ IF(NOT ITK_FOUND)
+
# Search ITK
FIND_PACKAGE(ITK)
# If itk found
IF(USE_WXWIDGETS)
IF(NOT wxWidgets_FOUND)
INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseWxWidgets.cmake)
- CREA_FIND_WXWIDGETS()
+ CREA_FIND_WXWIDGETS(${USE_DEBUG_LIB})
CREA_USE_WXWIDGETS()
ENDIF(NOT wxWidgets_FOUND)
ENDIF(USE_WXWIDGETS)
#boost_date_time-vc71-mt-1_37
#message("creamacro find and use lib = ${Boost_SIGNALS_LIBRARY}")
- IF(DEBUG)
+ 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 DEBUG)
+ 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(DEBUG)
+ ENDIF(USE_DEBUG_LIB)
ENDIF(WIN32)
IF(NOT WIN32)
IF(APPLE)
ENDIF(USE_BOOST)
#-----------------------------------------------------------------------------
+IF(USE_XERCES)
+
+ # FIND 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)
+
+ INCLUDE_DIRECTORIES( ${XERCES_LIB_DIR}/src )
+ LINK_DIRECTORIES( ${XERCES_LIB_DIR}/Build/Win32/VC9/Debug )
+
+ ENDIF(NOT XERCES_LIB_DIR)
+
+ IF(USE_DEBUG_LIB)
+ set(XERCES_LIBRARIES ${XERCES_LIB_DIR}/Build/Win32/VC9/Debug/xerces-c_3D)
+ ELSE(USE_DEBUG_LIB)
+ set(XERCES_LIBRARIES ${XERCES_LIB_DIR}/Build/Win32/VC9/Release/xerces-c_3)
+ ENDIF(USE_DEBUG_LIB)
+
+ MARK_AS_ADVANCED(XERCES_LIB_DIR)
+ ENDIF(WIN32)
+
+
+ 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)
+
+
+
+ENDIF(USE_XERCES)
+
ENDMACRO(CREA_FIND_AND_USE_LIBRARIES)