From 431a066f9477dd9c09bea123303a546ca49747db Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Thu, 9 Sep 2021 11:44:04 +0200 Subject: [PATCH] #3385 macOS compatibility --- cmake/CREAMacro_FindAndUseLibraries.cmake | 32 ++++++++++++++++------- cmake/CREAMacro_FindAndUseWxWidgets.cmake | 21 +++++++-------- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/cmake/CREAMacro_FindAndUseLibraries.cmake b/cmake/CREAMacro_FindAndUseLibraries.cmake index c942858..e5e57ba 100644 --- a/cmake/CREAMacro_FindAndUseLibraries.cmake +++ b/cmake/CREAMacro_FindAndUseLibraries.cmake @@ -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) diff --git a/cmake/CREAMacro_FindAndUseWxWidgets.cmake b/cmake/CREAMacro_FindAndUseWxWidgets.cmake index be117a9..8acd436 100644 --- a/cmake/CREAMacro_FindAndUseWxWidgets.cmake +++ b/cmake/CREAMacro_FindAndUseWxWidgets.cmake @@ -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) #======================================================================= -- 2.47.1