]> Creatis software - crea.git/commitdiff
#3384 vtk9itk4wx3-macos
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Fri, 10 Apr 2020 20:51:31 +0000 (22:51 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Fri, 10 Apr 2020 20:51:31 +0000 (22:51 +0200)
cmake/CREAMacro_FindAndUseLibraries.cmake
cmake/CREAMacro_FindAndUseVTK.cmake
cmake/CREAMacro_FindAndUseWxWidgets.cmake
src/creaRTTI.cxx
src/creawxVTKRenderWindowInteractor.cxx

index 52919c30b4c978cc78ceddf5ea20d15023fcfe86..eb8b24a4ecdcbf1e6fc3ad4dd90ed4860777e18e 100644 (file)
@@ -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)
index 7986404d9faaed5a4063426818f10d0c9f2ee92e..2b889d9cfd63c914a66a441d80f2e1df91122175 100644 (file)
@@ -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)
index bc07f5594fac7fd426a90e8d5fcbd64201c1e302..151d866f320cd9e2c82584c9bec01ab3c13294eb 100644 (file)
@@ -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)
 #=======================================================================
index 872d64b7a0721080314442e2fdee3e5079b2293c..5562f7e2d6988a90b07935c57a8e80279c4ada06 100644 (file)
@@ -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   = "<<source_pointer<<std::endl);
     void* tmp = source_pointer;
@@ -89,6 +96,7 @@ namespace crea
                                             -1);   
       }
     creaDebugMessage("info",7," * target   = "<<target_pointer<<std::endl);
+ */   
   #else
     creaWarning("run_time_up_or_down_cast not impl. on Win : to do");
     // target_pointer = __RTDynamicCast(source_pointer, 0, source_type, target_type, 0);
index 61fe2302b15066f77d7f137beeb1002769734d0a..42c06f01f4a4fe5f7af8ac076db2c5fe201226ed 100644 (file)
@@ -43,7 +43,8 @@
 
 =========================================================================*/
 
-#import <Cocoa/Cocoa.h>
+//EED2020-04-10
+//#import <Cocoa/Cocoa.h>
 
 
 #include <assert.h>
@@ -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;
 }
 //---------------------------------------------------------------------------