2019-01-11 03:54:05 +08:00
|
|
|
diff --git a/cmake/modules/FindwxWidgets.cmake b/cmake/modules/FindwxWidgets.cmake
|
2020-01-16 08:37:07 +08:00
|
|
|
index 4d3a2d1..c83d8a6 100644
|
2019-01-11 03:54:05 +08:00
|
|
|
--- a/cmake/modules/FindwxWidgets.cmake
|
|
|
|
+++ b/cmake/modules/FindwxWidgets.cmake
|
2020-01-16 08:37:07 +08:00
|
|
|
@@ -515,7 +515,14 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
2019-01-11 03:54:05 +08:00
|
|
|
set(_WX_ARCH _x64)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
- if(BUILD_SHARED_LIBS)
|
2020-01-16 08:37:07 +08:00
|
|
|
+
|
|
|
|
+ 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)
|
2019-01-11 03:54:05 +08:00
|
|
|
find_path(wxWidgets_LIB_DIR
|
|
|
|
NAMES
|
|
|
|
msw/wx/setup.h
|
2020-01-16 08:37:07 +08:00
|
|
|
@@ -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")
|
2019-01-11 03:54:05 +08:00
|
|
|
set(wxWidgets_DEFINITIONS WXUSINGDLL)
|
|
|
|
DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}")
|
|
|
|
endif()
|
2020-01-16 08:37:07 +08:00
|
|
|
-
|
|
|
|
+ if(BUILD_SHARED_LIBS)
|
2019-01-11 03:54:05 +08:00
|
|
|
+ set(wxWidgets_DEFINITIONS WXUSINGDLL)
|
2020-01-16 08:37:07 +08:00
|
|
|
+ endif(BUILD_SHARED_LIBS)
|
2019-01-11 03:54:05 +08:00
|
|
|
# Search for available configuration types.
|
|
|
|
foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw)
|
2020-01-16 08:37:07 +08:00
|
|
|
set(WX_${CFG}_FOUND FALSE)
|
|
|
|
@@ -583,6 +593,13 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
2019-01-11 03:54:05 +08:00
|
|
|
endforeach()
|
|
|
|
DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}")
|
|
|
|
|
2020-01-16 08:37:07 +08:00
|
|
|
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
|
|
+ set(WX_CONFIGURATION "mswud")
|
|
|
|
+ else()
|
|
|
|
+ set(WX_CONFIGURATION "mswu")
|
|
|
|
+ endif()
|
|
|
|
+ set(WX_${WX_CONFIGURATION}_FOUND TRUE)
|
|
|
|
+
|
2019-01-11 03:54:05 +08:00
|
|
|
if(WX_CONFIGURATION)
|
|
|
|
set(wxWidgets_FOUND TRUE)
|
2020-01-16 08:37:07 +08:00
|
|
|
|
|
|
|
@@ -616,6 +633,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
2019-01-11 03:54:05 +08:00
|
|
|
WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG)
|
|
|
|
|
|
|
|
# Set wxWidgets lib setup include directory.
|
2020-01-16 08:37:07 +08:00
|
|
|
+ set(wxWidgets_INCLUDE_DIRS "${wxWidgets_ROOT_DIR}/include")
|
|
|
|
+ if(0)
|
|
|
|
if(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
|
2019-01-11 03:54:05 +08:00
|
|
|
set(wxWidgets_INCLUDE_DIRS
|
|
|
|
${WX_LIB_DIR}/${wxWidgets_CONFIGURATION})
|
2020-01-16 08:37:07 +08:00
|
|
|
@@ -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)
|