]> Creatis software - crea.git/commitdiff
#3390 vtk8itk5wx3-macos in Linux
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Mon, 15 Nov 2021 15:11:31 +0000 (16:11 +0100)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Mon, 15 Nov 2021 15:11:31 +0000 (16:11 +0100)
cmake/CREAMacro_FindAndUseWxWidgets.cmake
src/CMakeLists.txt
src/creawxVTKRenderWindowInteractor.cxx [new file with mode: 0644]

index baf698e29f2d2afcc7f2b0c67dcb686729e8770b..eaf4b1cdf36b7b7b1d1901b83fd5e70d0525cb1e 100644 (file)
@@ -62,7 +62,7 @@ MACRO(CREA_FIND_WXWIDGETS)
     message("EED CREAMacro_FindAndUseWxWidgets APPLE.  forsing wxWidgets_CONFIG_EXECUTABLE.   wxWidgets_wxrc_EXECUTABLE ")
   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.0 CACHE STRING wxWidgets_wxrc_EXECUTABLE FORCE)
- elseif(APPLE)
+ 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)
@@ -102,7 +102,7 @@ MACRO(CREA_USE_WXWIDGETS)
   # Preprocessor settings
   CREA_DEFINE( USE_WXWIDGETS )
   CREA_DEFINE( _USE_WXWIDGETS_ )
+
  #
   IF(WIN32)
 #    # Clean ?
@@ -132,18 +132,13 @@ MACRO(CREA_USE_WXWIDGETS)
                                "${wxWidgets_LIB_DIR}/libwxmsw30u_html.a"   
                                "${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}
         )
-
-message("EED WXWIDGETS_LIBRARIES: "  ${WXWIDGETS_LIBRARIES} )
-
-    ELSEIF(APPLE)
+    ELSEIF(UNIX)
                ##    # GTK2
                ##    INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
                ##    LINK_DIRECTORIES(${GTK2_LIBRARY_DIRS})
@@ -152,15 +147,22 @@ message("EED WXWIDGETS_LIBRARIES: "  ${WXWIDGETS_LIBRARIES} )
         INCLUDE_DIRECTORIES(${GTK3_INCLUDE_DIRS})
         LINK_DIRECTORIES(${GTK3_LIBRARY_DIRS})
         LINK_LIBRARIES(${GTK3_LIBRARIES} )
-        message("EED GTK3_VERSION "${GTK3_VERSION})
+               message("EED GTK3_VERSION "${GTK3_VERSION})
+        message("EED GTK3_INCLUDE_DIRS "${GTK3_INCLUDE_DIRS})
+        message("EED GTK3_LIBRARY_DIRS "${GTK3_LIBRARY_DIRS})
+        message("EED GTK3_LIBRARIES "${GTK3_LIBRARIES})
        # WX
                #    INCLUDE( ${GTK_USE_FILE} )
        INCLUDE( ${wxWidgets_USE_FILE} )
        MARK_AS_ADVANCED(wxWidgets_CONFIG_EXECUTABLE)
-       SET(WXWIDGETS_LIBRARIES      ${GTK3_LIBRARIES}  )
-##     SET(WXWIDGETS_LIBRARIES      ${GTK3_LIBRARIES}                  #${GTK_LIBRARIES} )
-    ENDIF(APPLE)
+       SET(WXWIDGETS_LIBRARIES
+               ${GTK3_LIBRARIES}
+               ${wxWidgets_LIBRARIES}      
+               )
+
 
+
+    ENDIF(APPLE)
   ENDIF(WIN32)
 ENDMACRO(CREA_USE_WXWIDGETS)
 #=======================================================================
index 9c99fbb936a13f49467379e4d37139ed483ee0de..b86c5d4d53ff590772d05902c47c8f10b218d770 100644 (file)
@@ -49,11 +49,17 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/creaConfigure.h.in
                )
 #-----------------------------------------------------------------------------
 
+IF(APPLE)
+       set (creawxVTKRenderWindowInteractorSRC creawxVTKRenderWindowInteractor.mm)
+ELSEIF(UNIX OR WIN32)  
+       set (creawxVTKRenderWindowInteractorSRC creawxVTKRenderWindowInteractor.cxx)
+ENDIF(APPLE)
+
 SET( SRCS
   creaSystem
   creaMessageManager
   creaRTTI
-  creawxVTKRenderWindowInteractor
+  ${creawxVTKRenderWindowInteractorSRC}
   creaVtkBasicSlicer
   creaVtk
   creaFilesFromDirectory
diff --git a/src/creawxVTKRenderWindowInteractor.cxx b/src/creawxVTKRenderWindowInteractor.cxx
new file mode 100644 (file)
index 0000000..a7dc7a7
--- /dev/null
@@ -0,0 +1 @@
+#include "creawxVTKRenderWindowInteractor.mm"