mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-12 01:36:58 +00:00
Rebase wxwidgets overlay with upstream vcpkg port
This commit is contained in:
parent
5390f9338c
commit
bdbaccd542
5 changed files with 52 additions and 22 deletions
|
|
@ -5,6 +5,7 @@ project(wxwidgets-example)
|
||||||
add_executable(main WIN32 popup.cpp)
|
add_executable(main WIN32 popup.cpp)
|
||||||
|
|
||||||
find_package(wxWidgets REQUIRED)
|
find_package(wxWidgets REQUIRED)
|
||||||
|
target_compile_features(main PRIVATE cxx_std_11)
|
||||||
target_compile_definitions(main PRIVATE ${wxWidgets_DEFINITIONS} "$<$<CONFIG:DEBUG>:${wxWidgets_DEFINITIONS_DEBUG}>")
|
target_compile_definitions(main PRIVATE ${wxWidgets_DEFINITIONS} "$<$<CONFIG:DEBUG>:${wxWidgets_DEFINITIONS_DEBUG}>")
|
||||||
target_include_directories(main PRIVATE ${wxWidgets_INCLUDE_DIRS})
|
target_include_directories(main PRIVATE ${wxWidgets_INCLUDE_DIRS})
|
||||||
target_link_libraries(main PRIVATE ${wxWidgets_LIBRARIES})
|
target_link_libraries(main PRIVATE ${wxWidgets_LIBRARIES})
|
||||||
|
|
@ -13,6 +14,7 @@ add_executable(main2 WIN32 popup.cpp)
|
||||||
|
|
||||||
find_package(wxWidgets CONFIG REQUIRED)
|
find_package(wxWidgets CONFIG REQUIRED)
|
||||||
target_link_libraries(main2 PRIVATE wx::core wx::base)
|
target_link_libraries(main2 PRIVATE wx::core wx::base)
|
||||||
|
target_compile_features(main2 PRIVATE cxx_std_11)
|
||||||
|
|
||||||
option(USE_WXRC "Use the wxrc resource compiler" ON)
|
option(USE_WXRC "Use the wxrc resource compiler" ON)
|
||||||
if(USE_WXRC)
|
if(USE_WXRC)
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,23 @@
|
||||||
diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake
|
diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake
|
||||||
index f044d22d4d..48fc5ad072 100644
|
index f044d22d4d..a78b9aa1e9 100644
|
||||||
--- a/build/cmake/init.cmake
|
--- a/build/cmake/init.cmake
|
||||||
+++ b/build/cmake/init.cmake
|
+++ b/build/cmake/init.cmake
|
||||||
@@ -198,7 +198,7 @@ if(WIN32)
|
@@ -200,12 +200,12 @@ endif()
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
-if(WIN32_MSVC_NAMING)
|
if(WIN32_MSVC_NAMING)
|
||||||
+if(0)
|
|
||||||
if(wxBUILD_SHARED)
|
if(wxBUILD_SHARED)
|
||||||
set(lib_suffix "_dll")
|
- set(lib_suffix "_dll")
|
||||||
|
+ # set(lib_suffix "_dll")
|
||||||
else()
|
else()
|
||||||
|
- set(lib_suffix "_lib")
|
||||||
|
+ # set(lib_suffix "_lib")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
- set(wxPLATFORM_LIB_DIR "${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}${lib_suffix}")
|
||||||
|
+ # set(wxPLATFORM_LIB_DIR "${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}${lib_suffix}")
|
||||||
|
|
||||||
|
# Generator expression to not create different Debug and Release directories
|
||||||
|
set(GEN_EXPR_DIR "$<1:/>")
|
||||||
diff --git a/build/cmake/install.cmake b/build/cmake/install.cmake
|
diff --git a/build/cmake/install.cmake b/build/cmake/install.cmake
|
||||||
index a373983043..2e1ace7bf9 100644
|
index a373983043..2e1ace7bf9 100644
|
||||||
--- a/build/cmake/install.cmake
|
--- a/build/cmake/install.cmake
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,26 @@ vcpkg_from_github(
|
||||||
fix-pcre2.patch
|
fix-pcre2.patch
|
||||||
gtk3-link-libraries.patch
|
gtk3-link-libraries.patch
|
||||||
sdl2.patch
|
sdl2.patch
|
||||||
fix-dark-mode-offset.patch
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Submodule dependencies
|
||||||
|
vcpkg_from_github(
|
||||||
|
OUT_SOURCE_PATH lexilla_SOURCE_PATH
|
||||||
|
REPO wxWidgets/lexilla
|
||||||
|
REF "27c20a6ae5eebf418debeac0166052ed6fb653bc"
|
||||||
|
SHA512 7e5de7f664509473b691af8261fca34c2687772faca7260eeba5f2984516e6f8edf88c27192e056c9dda996e2ad2c20f6d1dff1c4bd2f3c0d74852cb50ca424a
|
||||||
|
HEAD_REF wx
|
||||||
|
)
|
||||||
|
file(COPY "${lexilla_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/stc/lexilla")
|
||||||
|
vcpkg_from_github(
|
||||||
|
OUT_SOURCE_PATH scintilla_SOURCE_PATH
|
||||||
|
REPO wxWidgets/scintilla
|
||||||
|
REF "0b90f31ced23241054e8088abb50babe9a44ae67"
|
||||||
|
SHA512 db1f3007f4bd8860fad0817b6cf87980a4b713777025128cf5caea8d6d17b6fafe23fd22ff6886d7d5a420f241d85b7502b85d7e52b4ddb0774edc4b0a0203e7
|
||||||
|
HEAD_REF wx
|
||||||
|
)
|
||||||
|
file(COPY "${scintilla_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/stc/scintilla")
|
||||||
|
|
||||||
vcpkg_check_features(
|
vcpkg_check_features(
|
||||||
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||||
FEATURES
|
FEATURES
|
||||||
|
|
@ -52,14 +69,20 @@ if(VCPKG_TARGET_IS_WINDOWS)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if("webview" IN_LIST FEATURES AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||||
|
list(APPEND OPTIONS -DwxUSE_WEBVIEW_EDGE_STATIC=ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
vcpkg_find_acquire_program(PKGCONFIG)
|
vcpkg_find_acquire_program(PKGCONFIG)
|
||||||
|
|
||||||
# This may be set to ON by users in a custom triplet.
|
# This may be set to ON by users in a custom triplet.
|
||||||
# The use of 'wxUSE_STL' and 'WXWIDGETS_USE_STD_CONTAINERS' (ON or OFF) are not API compatible
|
# The use of 'WXWIDGETS_USE_STD_CONTAINERS' (ON or OFF) is not API compatible
|
||||||
# which is why they must be set in a custom triplet rather than a port feature.
|
# which is why it must be set in a custom triplet rather than a port feature.
|
||||||
|
# For backwards compatibility, we also replace 'wxUSE_STL' (which no longer
|
||||||
|
# exists) with 'wxUSE_STD_STRING_CONV_IN_WXSTRING' which still exists and was
|
||||||
|
# set by `wxUSE_STL` previously.
|
||||||
if(NOT DEFINED WXWIDGETS_USE_STL)
|
if(NOT DEFINED WXWIDGETS_USE_STL)
|
||||||
set(WXWIDGETS_USE_STL OFF)
|
set(WXWIDGETS_USE_STL OFF)
|
||||||
set(WXWIDGETS_USE_STD_STRING_CONV_IN_WXSTRING OFF)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED WXWIDGETS_USE_STD_CONTAINERS)
|
if(NOT DEFINED WXWIDGETS_USE_STD_CONTAINERS)
|
||||||
|
|
@ -70,19 +93,18 @@ vcpkg_cmake_configure(
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
OPTIONS
|
OPTIONS
|
||||||
${FEATURE_OPTIONS}
|
${FEATURE_OPTIONS}
|
||||||
-DwxUSE_STC=OFF
|
|
||||||
-DwxUSE_REGEX=sys
|
-DwxUSE_REGEX=sys
|
||||||
-DwxUSE_ZLIB=sys
|
-DwxUSE_ZLIB=sys
|
||||||
-DwxUSE_EXPAT=sys
|
-DwxUSE_EXPAT=sys
|
||||||
-DwxUSE_LIBJPEG=sys
|
-DwxUSE_LIBJPEG=sys
|
||||||
-DwxUSE_LIBPNG=sys
|
-DwxUSE_LIBPNG=sys
|
||||||
-DwxUSE_LIBTIFF=sys
|
-DwxUSE_LIBTIFF=sys
|
||||||
-DwxUSE_LIBWEBP=sys
|
|
||||||
-DwxUSE_NANOSVG=sys
|
-DwxUSE_NANOSVG=sys
|
||||||
|
-DwxUSE_LIBWEBP=sys
|
||||||
-DwxUSE_GLCANVAS=ON
|
-DwxUSE_GLCANVAS=ON
|
||||||
-DwxUSE_LIBGNOMEVFS=OFF
|
-DwxUSE_LIBGNOMEVFS=OFF
|
||||||
-DwxUSE_LIBNOTIFY=OFF
|
-DwxUSE_LIBNOTIFY=OFF
|
||||||
-DwxUSE_STD_STRING_CONV_IN_WXSTRING=${WXWIDGETS_USE_STD_STRING_CONV_IN_WXSTRING}
|
-DwxUSE_STD_STRING_CONV_IN_WXSTRING=${WXWIDGETS_USE_STL}
|
||||||
-DwxUSE_STD_CONTAINERS=${WXWIDGETS_USE_STD_CONTAINERS}
|
-DwxUSE_STD_CONTAINERS=${WXWIDGETS_USE_STD_CONTAINERS}
|
||||||
-DwxUSE_UIACTIONSIMULATOR=OFF
|
-DwxUSE_UIACTIONSIMULATOR=OFF
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_GSPELL=ON
|
-DCMAKE_DISABLE_FIND_PACKAGE_GSPELL=ON
|
||||||
|
|
@ -126,6 +148,11 @@ vcpkg_copy_pdbs()
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/msvc")
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/msvc")
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||||
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/mswu")
|
||||||
|
if(VCPKG_BUILD_TYPE STREQUAL "release")
|
||||||
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/mswud")
|
||||||
|
endif()
|
||||||
|
|
||||||
file(GLOB_RECURSE INCLUDES "${CURRENT_PACKAGES_DIR}/include/*.h")
|
file(GLOB_RECURSE INCLUDES "${CURRENT_PACKAGES_DIR}/include/*.h")
|
||||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/mswu/wx/setup.h")
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/mswu/wx/setup.h")
|
||||||
list(APPEND INCLUDES "${CURRENT_PACKAGES_DIR}/lib/mswu/wx/setup.h")
|
list(APPEND INCLUDES "${CURRENT_PACKAGES_DIR}/lib/mswu/wx/setup.h")
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ set(WX_ROOT_DIR "${_vcpkg_wx_root}" CACHE INTERNAL "")
|
||||||
unset(_vcpkg_wx_root)
|
unset(_vcpkg_wx_root)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# Find all libs with "32" infix which is unknown to FindwxWidgets.cmake
|
# Find all libs with "33" infix which is unknown to FindwxWidgets.cmake
|
||||||
function(z_vcpkg_wxwidgets_find_base_library BASENAME)
|
function(z_vcpkg_wxwidgets_find_base_library BASENAME)
|
||||||
find_library(WX_${BASENAME}d wx${BASENAME}33ud NAMES wx${BASENAME}d PATHS "${wxWidgets_ROOT_DIR}/debug/lib" NO_DEFAULT_PATH)
|
find_library(WX_${BASENAME}d wx${BASENAME}33ud NAMES wx${BASENAME}d PATHS "${wxWidgets_ROOT_DIR}/debug/lib" NO_DEFAULT_PATH)
|
||||||
find_library(WX_${BASENAME} wx${BASENAME}33u NAMES wx${BASENAME} PATHS "${wxWidgets_ROOT_DIR}/lib" NO_DEFAULT_PATH REQUIRED)
|
find_library(WX_${BASENAME} wx${BASENAME}33u NAMES wx${BASENAME} PATHS "${wxWidgets_ROOT_DIR}/lib" NO_DEFAULT_PATH REQUIRED)
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,7 @@
|
||||||
"default-features": false
|
"default-features": false
|
||||||
},
|
},
|
||||||
"zstd",
|
"zstd",
|
||||||
{
|
"wxwidgets",
|
||||||
"name": "wxwidgets",
|
|
||||||
"features": [
|
|
||||||
"debug-support"
|
|
||||||
],
|
|
||||||
"default-features": false
|
|
||||||
},
|
|
||||||
"openssl",
|
"openssl",
|
||||||
{
|
{
|
||||||
"name": "curl",
|
"name": "curl",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue