]> Creatis software - crea.git/commitdiff
#3385 macOS compatibility vtk8itk5wx3-mingw64
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 9 Sep 2021 09:44:04 +0000 (11:44 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 9 Sep 2021 09:44:04 +0000 (11:44 +0200)
cmake/CREAMacro_FindAndUseLibraries.cmake
cmake/CREAMacro_FindAndUseWxWidgets.cmake

index c9428581bdbd38a6998f9c82d6c490001959ae4e..e5e57ba93b3db58324832d9bf98865e306f9fa07 100644 (file)
@@ -114,6 +114,7 @@ IF(USE_ITK)
                If (${ITK_VERSION_MAJOR} MATCHES "4"  OR  ${ITK_VERSION_MAJOR} MATCHES "5"  )
                        MESSAGE ( STATUS "* Version = ${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}")
                        SET(ITK_LIBRARIES ${ITK_LIBRARIES}) 
+                       MESSAGE ( STATUS "${ITK_LIBRARIES}")
                ELSEIF()
                        SET(ITK_LIBRARIES ITKCommon ITKIO ITKBasicFilters ITKAlgorithms)
                ENDIF()
@@ -326,9 +327,12 @@ IF(USE_BOOST)
        add_definitions( -DBOOST_ALL_NO_LIB )
        add_definitions( -DBOOST_ALL_DYN_LINK )
        IF (MINGW)
-##             FIND_PACKAGE(Boost COMPONENTS filesystem-mgw71 system-mgw71 signals-mgw71 date_time-mgw71 thread-mgw71 regex-mgw71 program_options-mgw71 REQUIRED)
-               set( Boost_INCLUDE_DIR $ENV{BOOST_ROOT}/include/boost-1_69)
-               FIND_PACKAGE(Boost COMPONENTS filesystem-mgw73-mt-x64-1_69  system-mgw73-mt-x64-1_69  date_time-mgw73-mt-x64-1_69 thread-mgw73-mt-x64-1_69 regex-mgw73-mt-x64-1_69 program_options-mgw73-mt-x64-1_69  REQUIRED)
+               IF(APPLE)
+                       FIND_PACKAGE(Boost COMPONENTS filesystem-mgw71 system-mgw71 signals-mgw71 date_time-mgw71 thread-mgw71 regex-mgw71 program_options-mgw71 REQUIRED)
+               ELSE(APPLE)
+                       set( Boost_INCLUDE_DIR $ENV{BOOST_ROOT}/include/boost-1_69)
+                       FIND_PACKAGE(Boost COMPONENTS filesystem-mgw73-mt-x64-1_69  system-mgw73-mt-x64-1_69  date_time-mgw73-mt-x64-1_69 thread-mgw73-mt-x64-1_69 regex-mgw73-mt-x64-1_69 program_options-mgw73-mt-x64-1_69  REQUIRED)
+               ENDIF(APPLE)
        ELSE (MINGW)
 #              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)
@@ -416,13 +420,21 @@ IF(USE_XERCES)
                  
                ENDIF(NOT XERCES_LIB_DIR)       
                
-               IF(USE_DEBUG_LIB)
-#EED 2019-07-03                        set(XERCES_LIBRARIES  xerces-c_3D)
-                       set(XERCES_LIBRARIES  xerces-c)
-               ELSE(USE_DEBUG_LIB)
-#EED 2019-07-03                        set(XERCES_LIBRARIES  xerces-c_3)
-                       set(XERCES_LIBRARIES  xerces-c)
-               ENDIF(USE_DEBUG_LIB)
+               IF(APPLE)
+                       IF(USE_DEBUG_LIB)
+                               set(XERCES_LIBRARIES  xerces-c_3D)
+                       ELSE(USE_DEBUG_LIB)
+                               set(XERCES_LIBRARIES  xerces-c_3)
+                       ENDIF(USE_DEBUG_LIB)
+               ELSEIF(APPLE)
+                       IF(USE_DEBUG_LIB)
+                               #EED 2019-07-03                 set(XERCES_LIBRARIES  xerces-c_3D)
+                               set(XERCES_LIBRARIES  xerces-c)
+                       ELSE(USE_DEBUG_LIB)
+                               #EED 2019-07-03                 set(XERCES_LIBRARIES  xerces-c_3)
+                               set(XERCES_LIBRARIES  xerces-c)
+                       ENDIF(USE_DEBUG_LIB)
+               ENDIF(APPLE)
                
                MARK_AS_ADVANCED(XERCES_LIB_DIR)
        ENDIF(WIN32)
index be117a9263ccf83b0b55ef2083d624aaa4749200..8acd436ff52be7cb7f42e381012fc986608ad614 100644 (file)
@@ -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/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)
+           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)
@@ -131,12 +133,8 @@ 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})
@@ -157,8 +155,7 @@ message("EED GTK3_VERSION "${GTK3_VERSION})
                #${GTK_LIBRARIES}
                ${wxWidgets_LIBRARIES}      
                )
-       endif(APPLE)
-  
+
   ENDIF(WIN32)
 ENDMACRO(CREA_USE_WXWIDGETS)
 #=======================================================================