yuzu/externals/vcpkg/ports/plplot/0001-findwxwidgets-fixes.patch

72 lines
2.7 KiB
Diff
Raw Normal View History

2022-07-23 05:01:36 +04:00
diff --git a/cmake/modules/FindwxWidgets.cmake b/cmake/modules/FindwxWidgets.cmake
index 4d3a2d1..c83d8a6 100644
--- a/cmake/modules/FindwxWidgets.cmake
+++ b/cmake/modules/FindwxWidgets.cmake
@@ -515,7 +515,14 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
set(_WX_ARCH _x64)
endif()
endif()
- if(BUILD_SHARED_LIBS)
+
+ include(SelectLibraryConfigurations)
+ find_library(wxWidgets_LIB_DIR_LIBRARY_RELEASE NAMES wxmsw31u_core)
+ find_library(wxWidgets_LIB_DIR_LIBRARY_DEBUG NAMES wxmsw31ud_core)
+ select_library_configurations(wxWidgets_LIB_DIR)
+ get_filename_component(wxWidgets_LIB_DIR ${wxWidgets_LIB_DIR} DIRECTORY)
+ if(0)
+ if(BUILD_SHARED_LIBS)
find_path(wxWidgets_LIB_DIR
NAMES
msw/wx/setup.h
@@ -554,6 +561,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
NO_DEFAULT_PATH
)
endif()
+ endif()
unset(_WX_TOOL)
unset(_WX_TOOLVER)
unset(_WX_ARCH)
@@ -571,7 +579,9 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
set(wxWidgets_DEFINITIONS WXUSINGDLL)
DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}")
endif()
-
+ if(BUILD_SHARED_LIBS)
+ set(wxWidgets_DEFINITIONS WXUSINGDLL)
+ endif(BUILD_SHARED_LIBS)
# Search for available configuration types.
foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw)
set(WX_${CFG}_FOUND FALSE)
@@ -583,6 +593,13 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
endforeach()
DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}")
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(WX_CONFIGURATION "mswud")
+ else()
+ set(WX_CONFIGURATION "mswu")
+ endif()
+ set(WX_${WX_CONFIGURATION}_FOUND TRUE)
+
if(WX_CONFIGURATION)
set(wxWidgets_FOUND TRUE)
@@ -616,6 +633,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG)
# Set wxWidgets lib setup include directory.
+ set(wxWidgets_INCLUDE_DIRS "${wxWidgets_ROOT_DIR}/include")
+ if(0)
if(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
set(wxWidgets_INCLUDE_DIRS
${WX_LIB_DIR}/${wxWidgets_CONFIGURATION})
@@ -623,7 +642,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
DBG_MSG("wxWidgets_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.")
set(wxWidgets_FOUND FALSE)
endif()
-
+ endif()
# Set wxWidgets main include directory.
if(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
list(APPEND wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include)