From: Eduardo DAVILA Date: Mon, 15 Nov 2021 15:11:31 +0000 (+0100) Subject: #3390 vtk8itk5wx3-macos in Linux X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=f2337ab0485f3c70869339e04fc7728c9a49fc02;p=crea.git #3390 vtk8itk5wx3-macos in Linux --- diff --git a/cmake/CREAMacro_FindAndUseWxWidgets.cmake b/cmake/CREAMacro_FindAndUseWxWidgets.cmake index baf698e..eaf4b1c 100644 --- a/cmake/CREAMacro_FindAndUseWxWidgets.cmake +++ b/cmake/CREAMacro_FindAndUseWxWidgets.cmake @@ -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) #======================================================================= diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9c99fbb..b86c5d4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 index 0000000..a7dc7a7 --- /dev/null +++ b/src/creawxVTKRenderWindowInteractor.cxx @@ -0,0 +1 @@ +#include "creawxVTKRenderWindowInteractor.mm"