+INCLUDE(${CREA_CMAKE_DIR}/CREACMakeSettings.cmake)
INCLUDE(${CREA_CMAKE_DIR}/CREAMacros.cmake)
INCLUDE(${CREA_CMAKE_DIR}/CREAResolveOptions.cmake)
#-----------------------------------------------------------------------------
+SET(CREA_BUILT_WITH_WX @CREA_BUILT_WITH_WX@)
+SET(CREA_BUILT_WITH_VTK @CREA_BUILT_WITH_VTK@)
SET(CREA_CMAKE_REL_PATH @CREA_CMAKE_REL_PATH@)
SET(CREA_CMAKE_DIR ${crea_DIR}/${CREA_CMAKE_REL_PATH})
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
IF(CREA_VERBOSE_CMAKE)
-# MESSAGE(STATUS "* CREA_BUILT_WITH_WX = ${CREA_BUILT_WITH_WX}")
+ MESSAGE(STATUS "* CREA_BUILT_WITH_WX = ${CREA_BUILT_WITH_WX}")
+ MESSAGE(STATUS "* CREA_BUILT_WITH_VTK = ${CREA_BUILT_WITH_VTK}")
MESSAGE(STATUS "* CREA_CMAKE_DIR = ${CREA_CMAKE_DIR}")
MESSAGE(STATUS "* CREA_COMPILE_MESSAGES = ${CREA_COMPILE_MESSAGES}")
MESSAGE(STATUS "* CREA_COMPILE_WARNING_MESSAGES = ${CREA_COMPILE_WARNING_MESSAGES}")
ENDIF(CREA_VERBOSE_CMAKE)
#-----------------------------------------------------------------------------
-# If crea was compiled with WxWidget or vtk then have to find them : for now forced (see root CMakeLists.txt)
-SET(USE_WXWIDGETS ON)
-SET(USE_VTK ON)
-
-INCLUDE(${CREA_CMAKE_DIR}/CREAMacros.cmake)
-
-#-----------------------------------------------------------------------------
-IF(USE_VTK)
- # Search VTK
- FIND_PACKAGE(VTK)
- # If vtk found
- IF(VTK_FOUND)
- MESSAGE ( STATUS "Looking for VTK... found")
- MESSAGE ( STATUS "* Dir = ${VTK_DIR}")
- MESSAGE ( STATUS "* Version = ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
- INCLUDE(${VTK_USE_FILE})
- CREA_DEFINE( USE_VTK )
- SET(VTK_LIBRARIES
- vtkImaging vtkGraphics vtkRendering vtkFiltering vtkCommon vtkWidgets
- vtkVolumeRendering
- # LG : removed vtkIO because conflict with itktiff lib in ITKIO
- )
- IF(NOT USE_ITK)
- SET(VTK_LIBRARIES ${VTK_LIBRARIES} vtkIO)
- ENDIF(NOT USE_ITK)
- MARK_AS_ADVANCED(VTK_DIR)
- ELSE(VTK_FOUND)
- message(FATAL_ERROR "VTK_DIR not found")
- ENDIF(VTK_FOUND)
-ENDIF(USE_VTK)
-#-----------------------------------------------------------------------------
-
-
-#-----------------------------------------------------------------------------
-IF(USE_WXWIDGETS)
- INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_wxWidgets.cmake)
- CREA_FIND_WXWIDGETS()
- CREA_USE_WXWIDGETS()
-ENDIF(USE_WXWIDGETS)
-#-----------------------------------------------------------------------------
+# If crea was compiled with WxWidget or vtk then have to find them : for now forced (see root CMakeLists.txt)
+IF(CREA_BUILT_WITH_WX OR CREA_BUILT_WITH_VTK)
+ INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_Define.cmake)
+ENDIF(CREA_BUILT_WITH_WX OR CREA_BUILT_WITH_VTK)
+IF(CREA_BUILT_WITH_WX)
+ MESSAGE(STATUS "=======================================")
+ MESSAGE(STATUS "crea was built with wxWidgets: have to find it...")
+ INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseWxWidgets.cmake)
+ CREA_FIND_AND_USE_WXWIDGETS()
+ENDIF(CREA_BUILT_WITH_WX)
+IF(CREA_BUILT_WITH_VTK)
+ MESSAGE(STATUS "=======================================")
+ MESSAGE(STATUS "crea was built with VTK: have to find it...")
+ INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseVTK.cmake)
+ CREA_FIND_AND_USE_VTK()
+ENDIF(CREA_BUILT_WITH_VTK)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
-#MARK_AS_ADVANCED( FORCE CMAKE_BACKWARDS_COMPATIBILITY )
-
-# for CMake 2.6 corrected behaviour (see "cmake --help-policy CMP0003")
-IF(COMMAND cmake_policy AND ${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
- CMAKE_POLICY(SET CMP0003 NEW)
- CMAKE_POLICY(SET CMP0005 NEW)
-ENDIF(COMMAND cmake_policy AND ${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
-
-
-
PROJECT(crea)
INCLUDE(Version.cmake)
SET(CREA_VERBOSE_CMAKE TRUE)
SET(CREA_CMAKE_REL_PATH cmake)
SET(CREA_CMAKE_DIR ${PROJECT_SOURCE_DIR}/${CREA_CMAKE_REL_PATH})
+INCLUDE(${CREA_CMAKE_DIR}/CREACMakeSettings.cmake)
INCLUDE(${CREA_CMAKE_DIR}/CREAMacros.cmake)
CREA_PREVENT_IN_SOURCE_BUILD()
-SET(USE_VTK ON)
+OPTION(CREA_BUILD_VTK "Build crea with vtk ?" OFF)
+IF(CREA_BUILD_VTK)
+ SET(USE_VTK ON)
+ SET(CREA_BUILT_WITH_VTK ON)
+ENDIF(CREA_BUILD_VTK)
#SET(USE_BOOST ON)
-SET(USE_WXWIDGETS ON)
+
+OPTION(CREA_BUILD_WX "Build crea with wxWidgets ?" OFF)
+IF(CREA_BUILD_WX)
+ SET(USE_WXWIDGETS ON)
+ SET(CREA_BUILT_WITH_WX ON)
+ENDIF(CREA_BUILD_WX)
CREA_FIND_AND_USE_LIBRARIES()
MACRO(CREA_ADD_EXECUTABLE EXE_NAME)
IF(CREA_VERBOSE_CMAKE)
- MESSAGE(STATUS "** Creating executable ${EXE_NAME}")
+ MESSAGE(STATUS "===============================================")
+ MESSAGE(STATUS "Configuring executable ${EXE_NAME}")
MESSAGE(STATUS " Sources : ${${EXE_NAME}_SOURCES}")
MESSAGE(STATUS " Link libs: ${${EXE_NAME}_LINK_LIBRARIES}")
+ MESSAGE(STATUS "===============================================")
ENDIF(CREA_VERBOSE_CMAKE)
IF(WIN32)
# Creates and installs a library
-# Uses CREA_MANAGE_SHARED_LIBRARY and CREA_INSTALL_LIBRARY
+# Uses CREA_DYNMAIC_LIBRARY_EXPORT and CREA_INSTALL_LIBRARY
# hence the variables to be set for these are needed
# Additionnaly one needs to set :
# ${LIBRARY_NAME}_HEADERS : the list of headers to install
MACRO(CREA_ADD_LIBRARY LIBRARY_NAME)
IF(CREA_VERBOSE_CMAKE)
- MESSAGE(STATUS "** Creating library ${LIBRARY_NAME}")
+ MESSAGE(STATUS "===============================================")
+ MESSAGE(STATUS "Configuring library ${LIBRARY_NAME}")
MESSAGE(STATUS " Headers : ${${LIBRARY_NAME}_HEADERS}")
MESSAGE(STATUS " Sources : ${${LIBRARY_NAME}_SOURCES}")
MESSAGE(STATUS " Link libs: ${${LIBRARY_NAME}_LINK_LIBRARIES}")
+ MESSAGE(STATUS "===============================================")
ENDIF(CREA_VERBOSE_CMAKE)
# MANAGE SHARED LIB
- CREA_MANAGE_SHARED_LIBRARY(${LIBRARY_NAME})
+ CREA_DYNAMIC_LIBRARY_EXPORT_OPTION(${LIBRARY_NAME})
# CREATE THE TARGET
ADD_LIBRARY(${LIBRARY_NAME} ${${LIBRARY_NAME}_SHARED} ${${LIBRARY_NAME}_SOURCES})
IF(USE_WXWIDGETS)
IF(CREA_VERBOSE_CMAKE)
- MESSAGE(STATUS "** Creating wx executable ${EXE_NAME}")
+ MESSAGE(STATUS "===============================================")
+ MESSAGE(STATUS "Configuring wx executable ${EXE_NAME}")
MESSAGE(STATUS " Sources : ${${EXE_NAME}_SOURCES}")
MESSAGE(STATUS " Link libs: ${${EXE_NAME}_LINK_LIBRARIES}")
IF(WIN32)
MESSAGE(STATUS " Console : ${${EXE_NAME}_CONSOLE}")
ENDIF(WIN32)
+ MESSAGE(STATUS "===============================================")
ENDIF(CREA_VERBOSE_CMAKE)
--- /dev/null
+# Manages the shared library creation/use
+# * Creates an option ${LIBRARY_NAME}_BUILD_SHARED
+# * Generates the file ${LIBRARY_NAME}_EXPORT.h which
+# defines the symbols ${LIBRARY_NAME}_EXPORT and ${LIBRARY_NAME}_CDECL
+# to be used in exported classes/functions declarations
+MACRO(CREA_DYNAMIC_LIBRARY_EXPORT_OPTION LIBRARY_NAME)
+
+ # STATIC OR DYNAMIC (SHARED) ?
+ OPTION( ${LIBRARY_NAME}_BUILD_SHARED
+ "Build ${LIBRARY_NAME} as a shared library (dynamic) ?" ON)
+ IF (${LIBRARY_NAME}_BUILD_SHARED)
+ SET(${LIBRARY_NAME}_SHARED SHARED)
+ CREA_DEFINE(${LIBRARY_NAME}_BUILD_SHARED)
+ ENDIF(${LIBRARY_NAME}_BUILD_SHARED)
+
+ CREA_DEFINE(${LIBRARY_NAME}_EXPORT_SYMBOLS)
+
+ # ADDS CURRENT BINARY DIR TO INCLUDE DIRS
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+
+ # CONFIGURES ${LIBRARY_NAME}_EXPORT.h
+ CONFIGURE_FILE(
+ ${CREA_CMAKE_DIR}/LIBRARY_NAME_EXPORT.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}_EXPORT.h
+ @ONLY IMMEDIATE
+ )
+ # ADDS IT TO THE LIST OF HEADERS
+ SET(${LIBRARY_NAME}_HEADERS
+ ${${LIBRARY_NAME}_HEADERS}
+ ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}_EXPORT.h
+ )
+
+
+ENDMACRO(CREA_DYNAMIC_LIBRARY_EXPORT_OPTION LIBRARY_NAME)
+
+
+# Manages the shared library creation/use
+# * Generates the file ${LIBRARY_NAME}_EXPORT.h which
+# defines the symbols ${LIBRARY_NAME}_EXPORT and ${LIBRARY_NAME}_CDECL
+# to be used in exported classes/functions declarations
+MACRO(CREA_DYNAMIC_LIBRARY_EXPORT LIBRARY_NAME)
+
+ CREA_DEFINE(${LIBRARY_NAME}_BUILD_SHARED)
+ CREA_DEFINE(${LIBRARY_NAME}_EXPORT_SYMBOLS)
+
+ # ADDS CURRENT BINARY DIR TO INCLUDE DIRS
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+
+ # CONFIGURES ${LIBRARY_NAME}_EXPORT.h
+ CONFIGURE_FILE(
+ ${CREA_CMAKE_DIR}/LIBRARY_NAME_EXPORT.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}_EXPORT.h
+ @ONLY IMMEDIATE
+ )
+ # ADDS IT TO THE LIST OF HEADERS
+ SET(${LIBRARY_NAME}_HEADERS
+ ${${LIBRARY_NAME}_HEADERS}
+ ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}_EXPORT.h
+ )
+
+ENDMACRO(CREA_DYNAMIC_LIBRARY_EXPORT LIBRARY_NAME)
#-----------------------------------------------------------------------------
IF(USE_VTK)
- # Search VTK
- FIND_PACKAGE(VTK)
- # If vtk found
- IF(VTK_FOUND)
- MESSAGE ( STATUS "Looking for VTK... found")
- MESSAGE ( STATUS "* Dir = ${VTK_DIR}")
- MESSAGE ( STATUS "* Version = ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
- INCLUDE(${VTK_USE_FILE})
- CREA_DEFINE( USE_VTK )
- SET(VTK_LIBRARIES
- vtkImaging vtkGraphics vtkRendering vtkFiltering vtkCommon vtkWidgets
- vtkVolumeRendering
- # LG : removed vtkIO because conflict with itktiff lib in ITKIO
- )
- IF(NOT USE_ITK)
- SET(VTK_LIBRARIES ${VTK_LIBRARIES} vtkIO)
- ENDIF(NOT USE_ITK)
- MARK_AS_ADVANCED(VTK_DIR)
- ELSE(VTK_FOUND)
- message(FATAL_ERROR "VTK_DIR not found")
- ENDIF(VTK_FOUND)
+ INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseVTK.cmake)
+ CREA_FIND_AND_USE_VTK()
ENDIF(USE_VTK)
#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+IF(USE_KW)
+ # Search KWWidgets
+ FIND_PACKAGE(KWWidgets)
+ # If found
+ IF(KWWidgets_FOUND)
+ MESSAGE ( STATUS "=======================================")
+ MESSAGE ( STATUS "Looking for KWWidgets... found")
+ MESSAGE ( STATUS "* Dir = ${KWWidgets_DIR}")
+ MESSAGE ( STATUS "* Version = ${KWWidgets_MAJOR_VERSION}.${KWWidgets_MINOR_VERSION}.${KWWidgets_BUILD_VERSION}")
+ INCLUDE(${KWWidgets_USE_FILE})
+ ADD_DEF( USE_KWWIDGETS )
+ SET(KWWIDGETS_LIBRARIES
+ ${KWWidgets_LIBRARIES}
+ )
+ MARK_AS_ADVANCED(KWWidgets_DIR)
+ ELSE(KWWidgets_FOUND)
+ message(FATAL_ERROR "KWWidgets_DIR not found")
+ ENDIF(KWWidgets_FOUND)
+ENDIF(USE_KW)
+#-----------------------------------------------------------------------------
+
+
#-----------------------------------------------------------------------------
IF(USE_ITK)
FIND_PACKAGE(ITK)
# If itk found
IF(ITK_FOUND)
+ MESSAGE ( STATUS "=======================================")
MESSAGE ( STATUS "Looking for ITK... found")
MESSAGE ( STATUS "* Dir = ${ITK_DIR}")
MESSAGE ( STATUS "* Version = ${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}")
ITKCommon ITKIO ITKBasicFilters ITKAlgorithms
)
MARK_AS_ADVANCED(ITK_DIR)
- # images compilation option
- OPTION ( itk_IMAGE_DIM_2 "itk : Compile 2D images" ON)
- OPTION ( itk_IMAGE_DIM_3 "itk : Compile 3D images" ON)
- OPTION ( itk_IMAGE_DIM_4 "itk : Compile 4D images" ON)
- OPTION ( itk_IMAGE_TYPE_CHAR "itk : Compile char images" ON)
- OPTION ( itk_IMAGE_TYPE_UCHAR "itk : Compile unsigned char images" ON)
- OPTION ( itk_IMAGE_TYPE_SHORT "itk : Compile short images" ON)
- OPTION ( itk_IMAGE_TYPE_USHORT "itk : Compile unsigned short images" ON)
- OPTION ( itk_IMAGE_TYPE_INT "itk : Compile int images" ON)
- OPTION ( itk_IMAGE_TYPE_UINT "itk : Compile unsigned int images" ON)
- OPTION ( itk_IMAGE_TYPE_FLOAT "itk : Compile float images" ON)
- OPTION ( itk_IMAGE_TYPE_DOUBLE "itk : Compile double images" ON)
-
- IF ( itk_IMAGE_DIM_2 )
- CREA_DEFINE( BBTK_ITK_IMAGE_DIM_2 )
- ENDIF ( itk_IMAGE_DIM_2 )
-
- IF ( itk_IMAGE_DIM_3 )
- CREA_DEFINE( BBTK_ITK_IMAGE_DIM_3 )
- ENDIF ( itk_IMAGE_DIM_3 )
-
- IF ( itk_IMAGE_DIM_4 )
- CREA_DEFINE( BBTK_ITK_IMAGE_DIM_4 )
- ENDIF ( itk_IMAGE_DIM_4 )
-
- IF ( itk_IMAGE_TYPE_CHAR )
- CREA_DEFINE( BBTK_ITK_IMAGE_TYPE_int8_t )
- ENDIF ( itk_IMAGE_TYPE_CHAR )
-
- IF ( itk_IMAGE_TYPE_UCHAR )
- CREA_DEFINE( BBTK_ITK_IMAGE_TYPE_uint8_t )
- ENDIF ( itk_IMAGE_TYPE_UCHAR )
-
- IF ( itk_IMAGE_TYPE_SHORT )
- CREA_DEFINE( BBTK_ITK_IMAGE_TYPE_int16_t )
- ENDIF ( itk_IMAGE_TYPE_SHORT )
-
- IF ( itk_IMAGE_TYPE_USHORT )
- CREA_DEFINE( BBTK_ITK_IMAGE_TYPE_uint16_t )
- ENDIF ( itk_IMAGE_TYPE_USHORT )
-
- IF ( itk_IMAGE_TYPE_INT )
- CREA_DEFINE( BBTK_ITK_IMAGE_TYPE_int32_t )
- ENDIF ( itk_IMAGE_TYPE_INT )
-
- IF ( itk_IMAGE_TYPE_UINT )
- CREA_DEFINE( BBTK_ITK_IMAGE_TYPE_uint32_t )
- ENDIF ( itk_IMAGE_TYPE_UINT )
-
- IF ( itk_IMAGE_TYPE_FLOAT )
- CREA_DEFINE( BBTK_ITK_IMAGE_TYPE_float )
- ENDIF ( itk_IMAGE_TYPE_FLOAT )
-
- IF ( itk_IMAGE_TYPE_DOUBLE )
- CREA_DEFINE( BBTK_ITK_IMAGE_TYPE_double )
- ENDIF ( itk_IMAGE_TYPE_DOUBLE )
ELSE(ITK_FOUND)
message(FATAL_ERROR "ITK_DIR not found")
ENDIF(ITK_FOUND)
INCLUDE(${GDCM_USE_FILE})
CREA_DEFINE( USE_GDCM )
+ MESSAGE ( STATUS "=======================================")
MESSAGE ( STATUS "Looking for GDCM... found")
MESSAGE ( STATUS "* Dir = ${GDCM_DIR}")
MESSAGE ( STATUS "* Version = ${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}")
CREA_DEFINE( USE_GDCM2 )
CREA_DEFINE_WITH_VAL( GDCM_NAME_SPACE gdcm )
+ MESSAGE ( STATUS "=======================================")
MESSAGE ( STATUS "Looking for GDCM2... found")
MESSAGE ( STATUS "* Dir = ${GDCM_DIR}")
MESSAGE ( STATUS "* Version = ${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}")
#-----------------------------------------------------------------------------
IF(USE_WXWIDGETS)
- INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_wxWidgets.cmake)
+ INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseWxWidgets.cmake)
CREA_FIND_WXWIDGETS()
CREA_USE_WXWIDGETS()
ENDIF(USE_WXWIDGETS)
#-----------------------------------------------------------------------------
IF(USE_DOXYGEN)
+ MESSAGE ( STATUS "=======================================")
FIND_PACKAGE(Doxygen REQUIRED)
# MESSAGE(STATUS "Looking for doxygen... - found ${DOXYGEN}")
# IF(DOXYGEN)
#-----------------------------------------------------------------------------
IF(USE_LATEX)
FIND_PACKAGE(LATEX REQUIRED)
+ MESSAGE ( STATUS "=======================================")
MESSAGE(STATUS "Looking for latex... - found ${LATEX_COMPILER}")
ENDIF(USE_LATEX)
#-----------------------------------------------------------------------------
IF (NOT LATEX_tth_CONVERTER)
MESSAGE(FATAL_ERROR "TTH not found (LATEX_tth_CONVERTER). Required to build the HTML documentation from tex source")
ELSE (NOT LATEX_tth_CONVERTER)
- MESSAGE(STATUS "Looking for tth... - found ${LATEX_tth_CONVERTER}")
+ MESSAGE ( STATUS "=======================================")
+ MESSAGE ( STATUS "Looking for tth... - found ${LATEX_tth_CONVERTER}")
ENDIF(NOT LATEX_tth_CONVERTER)
MARK_AS_ADVANCED(LATEX_tth_CONVERTER)
ENDIF(USE_TTH)
IF(USE_BOOST)
FIND_PACKAGE(Boost REQUIRED)
IF(Boost_FOUND)
- MESSAGE(STATUS "Looking for boost C++ library... - found in ${Boost_INCLUDE_DIR}")
+ 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 )
--- /dev/null
+MACRO(CREA_FIND_AND_USE_VTK)
+ #---------------------------------------------------------------------------
+ IF(NOT VTK_FOUND)
+ # Search VTK
+ FIND_PACKAGE(VTK)
+ # If vtk found
+ IF(VTK_FOUND)
+ MESSAGE ( STATUS "=======================================")
+ MESSAGE ( STATUS "Looking for VTK... found")
+ MESSAGE ( STATUS "* Dir = ${VTK_DIR}")
+ MESSAGE ( STATUS "* Version = ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
+ INCLUDE(${VTK_USE_FILE})
+ CREA_DEFINE( USE_VTK )
+ SET(VTK_LIBRARIES
+ vtkCommon # Mandatory
+ vtkFiltering # vtkImageData
+ vtkRendering # vtkProp3D
+ vtkWidgets # vtkImagePlaneWidget
+ vtkIO # vtkMetaImageReader/Writer
+ vtkImaging # filters such as vtkImageAnisotropicDiffusion3D
+ vtkGraphics # vtkContourFilter, sources
+ vtkVolumeRendering # Mappers
+ # vtkGenericFiltering
+ # LG : removed vtkIO because conflict with itktiff lib in ITKIO ??
+ )
+ IF(NOT USE_ITK)
+ SET(VTK_LIBRARIES ${VTK_LIBRARIES} vtkIO)
+ ENDIF(NOT USE_ITK)
+ MARK_AS_ADVANCED(VTK_DIR)
+ ELSE(VTK_FOUND)
+ message(FATAL_ERROR "VTK_DIR not found")
+ ENDIF(VTK_FOUND)
+ ENDIF(NOT VTK_FOUND)
+ #---------------------------------------------------------------------------
+ENDMACRO(CREA_FIND_AND_USE_VTK)
#
ELSE(WIN32)
+ IF(NOT wxWidgets_FOUND)
# CMake 2.6:
# technically those packages are not required
# since one can still use the Motif/X11 version and not the gtk one:
${WXGLCANVASLIBS})
#
IF(wxWidgets_FOUND)
- MESSAGE(STATUS "Looking for wxWidgets... found ${wxWidgets_CONFIG_EXECUTABLE}")
+ MESSAGE ( STATUS "=======================================")
+ MESSAGE ( STATUS "Looking for wxWidgets... found ${wxWidgets_CONFIG_EXECUTABLE}")
ENDIF(wxWidgets_FOUND)
+ ENDIF(NOT wxWidgets_FOUND)
ENDIF(WIN32)
MACRO(CREA_USE_WXWIDGETS)
# Preprocessor settings
CREA_DEFINE( USE_WXWIDGETS )
+ CREA_DEFINE( _USE_WXWIDGETS_ )
#
IF(WIN32)
# Clean ?
ENDIF(WIN32)
ENDMACRO(CREA_USE_WXWIDGETS)
#=======================================================================
+
+#=======================================================================
+MACRO(CREA_FIND_AND_USE_WXWIDGETS)
+ CREA_FIND_WXWIDGETS()
+ CREA_USE_WXWIDGETS()
+ENDMACRO(CREA_FIND_AND_USE_WXWIDGETS)
+#=======================================================================
#========================================================================
#========================================================================
-INCLUDE( ${CREA_CMAKE_DIR}/CREAMacro_ManageSharedLibrary.cmake )
+INCLUDE( ${CREA_CMAKE_DIR}/CREAMacro_DynamicLibraryExport.cmake )
#========================================================================
#========================================================================
+MESSAGE(STATUS "=======================================")
+MESSAGE(STATUS "Resolving crea compilation options")
# messages compilation options
IF (CREA_COMPILE_MESSAGES)
CREA_DEFINE( CREA_COMPILE_MESSAGES )
IF (CREA_COMPILE_ERROR_MESSAGES)
CREA_DEFINE( CREA_COMPILE_ERROR_MESSAGES )
ENDIF (CREA_COMPILE_ERROR_MESSAGES)
+MESSAGE(STATUS "=======================================")
# Messages
IF(CREA_VERBOSE_CMAKE)
- MESSAGE(STATUS "Looking for @LIBRARY_NAME@... found - configuration :")
+ MESSAGE(STATUS "=======================================")
+ MESSAGE(STATUS "Looking for @LIBRARY_NAME@... found:")
MESSAGE(STATUS "* @LIBRARY_NAME@_DIR = ${@LIBRARY_NAME@_DIR}")
MESSAGE(STATUS "* @LIBRARY_NAME@_VERSION = ${@LIBRARY_NAME@_VERSION}")
MESSAGE(STATUS "* @LIBRARY_NAME@_USE_FILE = ${@LIBRARY_NAME@_USE_FILE}")
--- /dev/null
+#ifndef __@LIBRARY_NAME@DLLImportExport_h_INCLUDED__
+#define __@LIBRARY_NAME@DLLImportExport_h_INCLUDED__
+
+// Automatically generated file which defines
+// the symbols @LIBRARY_NAME@_EXPORT and @LIBRARY_NAME@_CDECL
+// to be used for the definition of classes or functions
+// which must be exported when the lib is built as a shared lib on Windows
+// and imported when the shared lib is used by another program
+
+#if defined(_WIN32) && defined (@LIBRARY_NAME@_BUILD_SHARED)
+ #ifdef @LIBRARY_NAME@_EXPORT_SYMBOLS
+ #define @LIBRARY_NAME@_EXPORT __declspec( dllexport )
+#else
+ #define @LIBRARY_NAME@_EXPORT __declspec( dllimport )
+ #endif
+ #define @LIBRARY_NAME@_CDECL __cdecl
+#else
+ #define @LIBRARY_NAME@_EXPORT
+ #define @LIBRARY_NAME@_CDECL
+#endif // defined(_WIN32)
+
+#endif
+
+
+MESSAGE(STATUS "===============================================")
+MESSAGE(STATUS "Configuring crea library")
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
#-----------------------------------------------------------------------------
TARGETS crea
DESTINATION ${CREA_LIB_PATH})
#----------------------------------------------------------------------------
+MESSAGE(STATUS "===============================================")
Program: Visualization Toolkit
Module: $RCSfile: creawxVTKRenderWindowInteractor.cxx,v $
Language: C++
- Date: $Date: 2008/10/15 11:19:18 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/12/11 14:27:00 $
+ Version: $Revision: 1.2 $
Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
+#ifdef USE_WXWIDGETS
+#ifdef USE_VTK
#include "creawxVTKRenderWindowInteractor.h"
// LG : EO namespace
//=======================================================================
+#endif // USE_WX
+#endif // USE_VTK
Program: Visualization Toolkit
Module: $RCSfile: creawxVTKRenderWindowInteractor.h,v $
Language: C++
- Date: $Date: 2008/10/15 11:19:18 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/12/11 14:27:00 $
+ Version: $Revision: 1.2 $
Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
#ifndef _creawxVTKRenderWindowInteractor_h_
#define _creawxVTKRenderWindowInteractor_h_
+#ifdef USE_WXWIDGETS
+#ifdef USE_VTK
+
#include <creaSystem.h>
#include <creaWx.h>
// LG : EO namespace crea
//======================================================================
+#endif // USE_WX
+#endif // USE_VTK
#endif //_creawxVTKRenderWindowInteractor_h_