From f1870a83b513b34960cb6319b58b437d40e6a068 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Fri, 10 Apr 2020 22:51:31 +0200 Subject: [PATCH] #3384 vtk9itk4wx3-macos --- cmake/CREAMacro_FindAndUseLibraries.cmake | 3 +- cmake/CREAMacro_FindAndUseVTK.cmake | 264 +++++++++++----------- cmake/CREAMacro_FindAndUseWxWidgets.cmake | 37 +-- src/creaRTTI.cxx | 10 +- src/creawxVTKRenderWindowInteractor.cxx | 11 +- 5 files changed, 170 insertions(+), 155 deletions(-) diff --git a/cmake/CREAMacro_FindAndUseLibraries.cmake b/cmake/CREAMacro_FindAndUseLibraries.cmake index 52919c3..eb8b24a 100644 --- a/cmake/CREAMacro_FindAndUseLibraries.cmake +++ b/cmake/CREAMacro_FindAndUseLibraries.cmake @@ -330,7 +330,8 @@ IF(USE_BOOST) IF (MINGW) FIND_PACKAGE(Boost COMPONENTS filesystem-mgw71 system-mgw71 signals-mgw71 date_time-mgw71 thread-mgw71 regex-mgw71 program_options-mgw71 REQUIRED) ELSE (MINGW) - FIND_PACKAGE(Boost COMPONENTS filesystem system signals date_time thread regex program_options REQUIRED) +# FIND_PACKAGE(Boost COMPONENTS filesystem system signals date_time thread regex program_options REQUIRED) + FIND_PACKAGE(Boost COMPONENTS filesystem system date_time thread regex program_options REQUIRED) ENDIF(MINGW) IF(Boost_FOUND) ADD_DEFINITIONS(-DBOOST_FILESYSTEM_VERSION=3) diff --git a/cmake/CREAMacro_FindAndUseVTK.cmake b/cmake/CREAMacro_FindAndUseVTK.cmake index 7986404..2b889d9 100644 --- a/cmake/CREAMacro_FindAndUseVTK.cmake +++ b/cmake/CREAMacro_FindAndUseVTK.cmake @@ -1,7 +1,7 @@ # --------------------------------------------------------------------- # # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image -# pour la Santé) +# pour la Santé© # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton # Previous Authors : Laurent Guigues, Jean-Pierre Roux # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil @@ -38,6 +38,8 @@ MACRO(CREA_FIND_AND_USE_VTK) MESSAGE ( STATUS "Looking for VTK... found") MESSAGE ( STATUS "* Dir = ${VTK_DIR}") MESSAGE ( STATUS "* Version = ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}") + + SET(VTK_BUILD_SETTINGS_FILE OFF) INCLUDE(${VTK_USE_FILE}) LINK_DIRECTORIES(${VTK_DIR}) #DFCH -- 16/7/2012 @@ -61,14 +63,14 @@ MACRO(CREA_FIND_AND_USE_VTK) ##EED 2017-01-01 Migration VTK7 IF("${VTK_MAJOR_VERSION}" LESS 6) SET(VTK_LIBRARIES - vtkCommon # Mandatory - vtkFiltering # vtkImageData - vtkRendering # vtkProp3D - vtkWidgets # vtkImagePlaneWidget - vtkIO # vtkMetaImageReader/Writer - vtkImaging # filters such as vtkImageAnisotropicDiffusion3D - vtkGraphics # vtkContourFilter, sources - vtkVolumeRendering # Mappers + vtkCommon # Mandatory + vtkFiltering # vtkImageData + vtkRendering # vtkProp3D + vtkWidgets # vtkImagePlaneWidget + vtkIO # vtkMetaImageReader/Writer + vtkImaging # filters such as vtkImageAnisotropicDiffusion3D + vtkGraphics # vtkContourFilter, sources + vtkVolumeRendering # Mappers vtkGenericFiltering vtkHybrid # vtkInfovis @@ -82,125 +84,125 @@ ENDIF("${VTK_MAJOR_VERSION}" LESS 6) ##EED 2017-01-01 Migration VTK7 -IF("${VTK_MAJOR_VERSION}" GREATER 5) - SET(VTK_LIBRARIES - vtkalglib - vtkFiltersHybrid - vtkImagingCore - vtkIOLegacy - vtkRenderingAnnotation - vtkChartsCore - vtkFiltersHyperTree - vtkImagingFourier - vtkIOLSDyna - vtkRenderingContext2D - vtkCommonColor - vtkFiltersImaging - vtkImagingGeneral - vtkIOMINC - vtkCommonComputationalGeometry - vtkFiltersModeling - vtkImagingHybrid - vtkIOMovie - vtkRenderingCore - vtkCommonCore - vtkFiltersParallel - vtkImagingMath - vtkIONetCDF - vtkRenderingFreeType - vtkCommonDataModel - vtkFiltersParallelImaging - vtkImagingMorphological - vtkIOParallel - vtkCommonExecutionModel - vtkFiltersPoints - vtkImagingSources - vtkIOParallelXML - vtkRenderingImage - vtkCommonMath - vtkFiltersProgrammable - vtkImagingStatistics - vtkIOPLY - vtkRenderingLabel - vtkCommonMisc - vtkFiltersSelection - vtkImagingStencil - vtkIOSQL - vtkRenderingLOD - vtkCommonSystem - vtkFiltersSMP - vtkInfovisCore - vtkIOTecplotTable - vtkCommonTransforms - vtkFiltersSources - vtkInfovisLayout - vtkIOVideo - vtkDICOMParser - vtkFiltersStatistics - vtkInteractionImage - vtkIOXML - vtkRenderingVolume - vtkDomainsChemistry - vtkFiltersTexture - vtkInteractionStyle - vtkIOXMLParser - vtkFiltersVerdict - vtkInteractionWidgets - vtkjpeg - vtksqlite - vtkexoIIc - vtkfreetype - vtkIOAMR - vtkjsoncpp - vtksys - vtkexpat - vtkGeovisCore - vtkIOCore - vtklibxml2 - vtktiff - vtkFiltersAMR - vtkgl2ps - vtkIOEnSight - vtkmetaio -# vtkverdict - vtkFiltersCore - vtkIOExodus - vtkNetCDF - vtkViewsContext2D - vtkFiltersExtraction - vtkIOExport - vtkViewsCore - vtkFiltersFlowPaths - vtkIOGeometry - vtkoggtheora - vtkViewsGeovis - vtkFiltersGeneral - vtkhdf5 - vtkIOImage - vtkParallelCore - vtkViewsInfovis - vtkFiltersGeneric - vtkhdf5_hl - vtkIOImport - vtkpng - vtkFiltersGeometry - vtkImagingColor - vtkIOInfovis - vtkproj4 - vtkzlib - -# vtkRenderingVolumeOpenGL -# vtkRenderingOpenGL -# vtkRenderingGL2PS -# vtkRenderingContextOpenGL - - vtkglew - vtkRenderingVolumeOpenGL2 - vtkDomainsChemistryOpenGL2 - vtkRenderingOpenGL2 - vtkRenderingGL2PSOpenGL2 - vtkRenderingContextOpenGL2 - ) +#IF("${VTK_MAJOR_VERSION}" GREATER 5) +# SET(VTK_LIBRARIES +# vtkalglib +# vtkFiltersHybrid +# vtkImagingCore +# vtkIOLegacy +# vtkRenderingAnnotation +# vtkChartsCore +# vtkFiltersHyperTree +# vtkImagingFourier +# vtkIOLSDyna +# vtkRenderingContext2D +# vtkCommonColor +# vtkFiltersImaging +# vtkImagingGeneral +# vtkIOMINC +# vtkCommonComputationalGeometry +# vtkFiltersModeling +# vtkImagingHybrid +# vtkIOMovie +# vtkRenderingCore +# vtkCommonCore +# vtkFiltersParallel +# vtkImagingMath +# vtkIONetCDF +# vtkRenderingFreeType +# vtkCommonDataModel +# vtkFiltersParallelImaging +# vtkImagingMorphological +# vtkIOParallel +# vtkCommonExecutionModel +# vtkFiltersPoints +# vtkImagingSources +# vtkIOParallelXML +# vtkRenderingImage +# vtkCommonMath +# vtkFiltersProgrammable +# vtkImagingStatistics +# vtkIOPLY +# vtkRenderingLabel +# vtkCommonMisc +# vtkFiltersSelection +# vtkImagingStencil +# vtkIOSQL +# vtkRenderingLOD +# vtkCommonSystem +# vtkFiltersSMP +# vtkInfovisCore +# vtkIOTecplotTable +# vtkCommonTransforms +# vtkFiltersSources +# vtkInfovisLayout +# vtkIOVideo +# vtkDICOMParser +# vtkFiltersStatistics +# vtkInteractionImage +# vtkIOXML +# vtkRenderingVolume +# vtkDomainsChemistry +# vtkFiltersTexture +# vtkInteractionStyle +# vtkIOXMLParser +# vtkFiltersVerdict +# vtkInteractionWidgets +# vtkjpeg +# vtksqlite +# vtkexoIIc +# vtkfreetype +# vtkIOAMR +# vtkjsoncpp +# vtksys +# vtkexpat +# vtkGeovisCore +# vtkIOCore +# vtklibxml2 +# vtktiff +# vtkFiltersAMR +# vtkgl2ps +# vtkIOEnSight +# vtkmetaio +## vtkverdict +# vtkFiltersCore +# vtkIOExodus +# vtkNetCDF +# vtkViewsContext2D +# vtkFiltersExtraction +# vtkIOExport +# vtkViewsCore +# vtkFiltersFlowPaths +# vtkIOGeometry +# vtkoggtheora +# vtkViewsGeovis +# vtkFiltersGeneral +# vtkhdf5 +# vtkIOImage +# vtkParallelCore +# vtkViewsInfovis +# vtkFiltersGeneric +# vtkhdf5_hl +# vtkIOImport +# vtkpng +# vtkFiltersGeometry +# vtkImagingColor +# vtkIOInfovis +# vtkproj4 +# vtkzlib +# +## vtkRenderingVolumeOpenGL +## vtkRenderingOpenGL +## vtkRenderingGL2PS +## vtkRenderingContextOpenGL +# +# vtkglew +# vtkRenderingVolumeOpenGL2 +# vtkDomainsChemistryOpenGL2 +# vtkRenderingOpenGL2 +# vtkRenderingGL2PSOpenGL2 +# vtkRenderingContextOpenGL2 +# ) IF (WIN32) SET(VTK_LIBRARIES ${VTK_LIBRARIES} ) ELSE(WIN32) @@ -211,10 +213,8 @@ IF("${VTK_MAJOR_VERSION}" GREATER 5) # vtkViewsQt # vtkNetCDF_cxx ) - ENDIF(WIN32) - - -ENDIF("${VTK_MAJOR_VERSION}" GREATER 5) + ENDIF(WIN32) +# ENDIF("${VTK_MAJOR_VERSION}" GREATER 5) MARK_AS_ADVANCED(VTK_DIR) diff --git a/cmake/CREAMacro_FindAndUseWxWidgets.cmake b/cmake/CREAMacro_FindAndUseWxWidgets.cmake index bc07f55..151d866 100644 --- a/cmake/CREAMacro_FindAndUseWxWidgets.cmake +++ b/cmake/CREAMacro_FindAndUseWxWidgets.cmake @@ -1,7 +1,7 @@ # --------------------------------------------------------------------- # # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image -# pour la Santé) +# pour la Santé© # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton # Previous Authors : Laurent Guigues, Jean-Pierre Roux # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil @@ -58,10 +58,12 @@ MACRO(CREA_FIND_WXWIDGETS) MESSAGE ( "===============Manual wx-config 3 EED =======================") ##2018-08-28 -if(APPLE) - SET(wxWidgets_CONFIG_EXECUTABLE /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/bin/wx-config CACHE STRING wxWidgets_CONFIG_EXECUTABLE FORCE) - SET(wxWidgets_wxrc_EXECUTABLE /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/bin/wxrc-3.1 CACHE STRING wxWidgets_wxrc_EXECUTABLE FORCE) -elseif(UNIX) + if(APPLE) + message("EED CREAMacro_FindAndUseWxWidgets APPLE. forsing wxWidgets_CONFIG_EXECUTABLE. wxWidgets_wxrc_EXECUTABLE ") + SET(wxWidgets_CONFIG_EXECUTABLE /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/3.0/bin/wx-config CACHE STRING wxWidgets_CONFIG_EXECUTABLE FORCE) + SET(wxWidgets_wxrc_EXECUTABLE /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/3.0/bin/wxrc-3.0 CACHE STRING wxWidgets_wxrc_EXECUTABLE FORCE) + elseif(UNIX) + message("EED CREAMacro_FindAndUseWxWidgets UNIX") #MESSAGE ( "===============Manual wx-config 2 EED =======================") #SET(wxWidgets_CONFIG_EXECUTABLE /usr/bin/wx-config-2.0 CACHE STRING wxWidgets_CONFIG_EXECUTABLE FORCE) #SET(wxWidgets_wxrc_EXECUTABLE /usr/bin/wxrc-2.8 CACHE STRING wxWidgets_wxrc_EXECUTABLE FORCE) @@ -70,11 +72,12 @@ elseif(UNIX) # CMake 2.6: # technically those packages are not required # since one can still use the Motif/X11 version and not the gtk one: + endif(APPLE) + FIND_PACKAGE(PkgConfig REQUIRED) ## pkg_check_modules (GTK2 gtk+-2.0) ## pkg_check_modules (GTK322 gtk+-3.0) pkg_check_modules (GTK3 REQUIRED gtk+-3.0) -endif(APPLE) # Can I require all my user to have the gl lib on linux, even if they do not really need it... SET(WXGLCANVASLIBS "gl") @@ -131,33 +134,31 @@ MACRO(CREA_USE_WXWIDGETS) "${wxWidgets_LIB_DIR}/libwxmsw30u_adv.a" ) ELSE(WIN32) - - if(APPLE) - INCLUDE( ${wxWidgets_USE_FILE} ) - MARK_AS_ADVANCED(wxWidgets_CONFIG_EXECUTABLE) - SET(WXWIDGETS_LIBRARIES ${wxWidgets_LIBRARIES} ) - elseif(UNIX) + + ## # GTK2 ## INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS}) ## LINK_DIRECTORIES(${GTK2_LIBRARY_DIRS}) ## LINK_LIBRARIES(${GTK2_LIBRARIES}) + ## SET(WXWIDGETS_LIBRARIES + ## GTK2 + ## ${GTK2_LIBRARIES} + ## #${GTK_LIBRARIES} + ## ${wxWidgets_LIBRARIES} + ## ) + # GTK3 INCLUDE_DIRECTORIES(${GTK3_INCLUDE_DIRS}) LINK_DIRECTORIES(${GTK3_LIBRARY_DIRS}) - LINK_LIBRARIES(${GTK3_LIBRARIES} ) # WX # INCLUDE( ${GTK_USE_FILE} ) INCLUDE( ${wxWidgets_USE_FILE} ) MARK_AS_ADVANCED(wxWidgets_CONFIG_EXECUTABLE) SET(WXWIDGETS_LIBRARIES - ## GTK2 - ## ${GTK2_LIBRARIES} ${GTK3_LIBRARIES} - #${GTK_LIBRARIES} ${wxWidgets_LIBRARIES} ) - endif(APPLE) - + ENDIF(WIN32) ENDMACRO(CREA_USE_WXWIDGETS) #======================================================================= diff --git a/src/creaRTTI.cxx b/src/creaRTTI.cxx index 872d64b..5562f7e 100644 --- a/src/creaRTTI.cxx +++ b/src/creaRTTI.cxx @@ -2,7 +2,7 @@ # --------------------------------------------------------------------- # # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image -# pour la Santé) +# pour la Santé© # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton # Previous Authors : Laurent Guigues, Jean-Pierre Roux # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil @@ -74,6 +74,13 @@ namespace crea (__GNUC__ == 3 && (__GNUC_MINOR__ > 1 || \ (__GNUC_MINOR__ == 1 && \ __GNUC_PATCHLEVEL__ > 0))) + +printf("EED run_time_up_or_down_cast Warnning This code not commpilling in mac and in Linux ?????? n"); +printf("EED run_time_up_or_down_cast Warnning This code not commpilling in mac and in Linux ?????? n"); +printf("EED run_time_up_or_down_cast Warnning This code not commpilling in mac and in Linux ?????? n"); +printf("EED run_time_up_or_down_cast Warnning This code not commpilling in mac and in Linux ?????? n"); +printf("EED run_time_up_or_down_cast Warnning This code not commpilling in mac and in Linux ?????? n"); +/* const abi::__class_type_info* targetTI = (const abi::__class_type_info *)( &(target_type)); creaDebugMessage("info",7," * source = "< +//EED2020-04-10 +//#import #include @@ -225,7 +226,11 @@ namespace crea END_EVENT_TABLE() //EED win Compilation why??: vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision$") -vtkInstantiatorNewMacro(wxVTKRenderWindowInteractor) + +//EED2020-04-10 +#if VTK_MAJOR_VERSION < 8 + vtkInstantiatorNewMacro(wxVTKRenderWindowInteractor) +#endif #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) static int wxvtk_attributes[]={ @@ -499,7 +504,7 @@ printf("EED wxVTKRenderWindowInteractor::GetHandleHack End AAA handle_tmp %ld \ // handle_tmp = (long)this->GetXWindow(); //#endif -printf("EED wxVTKRenderWindowInteractor::GetHandleHack End BBB handle_tmp %d \n", handle_tmp); +printf("EED wxVTKRenderWindowInteractor::GetHandleHack End BBB handle_tmp %ld \n", handle_tmp); return handle_tmp; } //--------------------------------------------------------------------------- -- 2.47.1