Skip to content

Commit

Permalink
[wxwidgets] Fix debug-/release-only build (microsoft#22464)
Browse files Browse the repository at this point in the history
Signed-off-by: Vitalii Koshura <[email protected]>
  • Loading branch information
AenBleidd authored Jan 12, 2022
1 parent 9e0e976 commit 9b654a1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
20 changes: 11 additions & 9 deletions ports/wxwidgets/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,17 @@ if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/wx/setup.h)
file(GLOB_RECURSE WX_SETUP_H_FILES_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/*.h)
file(GLOB_RECURSE WX_SETUP_H_FILES_REL ${CURRENT_PACKAGES_DIR}/lib/*.h)

vcpkg_replace_string("${WX_SETUP_H_FILES_DBG}" "${CURRENT_PACKAGES_DIR}" "")
vcpkg_replace_string("${WX_SETUP_H_FILES_REL}" "${CURRENT_PACKAGES_DIR}" "")

string(REPLACE "${CURRENT_PACKAGES_DIR}/debug/lib/" "" WX_SETUP_H_FILES_DBG "${WX_SETUP_H_FILES_DBG}")
string(REPLACE "/setup.h" "" WX_SETUP_H_DBG_RELATIVE "${WX_SETUP_H_FILES_DBG}")

string(REPLACE "${CURRENT_PACKAGES_DIR}/lib/" "" WX_SETUP_H_FILES_REL "${WX_SETUP_H_FILES_REL}")
string(REPLACE "/setup.h" "" WX_SETUP_H_REL_RELATIVE "${WX_SETUP_H_FILES_REL}")

if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
vcpkg_replace_string("${WX_SETUP_H_FILES_REL}" "${CURRENT_PACKAGES_DIR}" "")
vcpkg_replace_string("${WX_SETUP_H_FILES_REL}" "${CURRENT_PACKAGES_DIR}/lib/" "")
vcpkg_replace_string("${WX_SETUP_H_FILES_REL}" "/setup.h" "")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
vcpkg_replace_string("${WX_SETUP_H_FILES_DBG}" "${CURRENT_PACKAGES_DIR}" "")
vcpkg_replace_string("${WX_SETUP_H_FILES_DBG}" "${CURRENT_PACKAGES_DIR}/debug/lib/" "")
vcpkg_replace_string("${WX_SETUP_H_FILES_DBG}" "/setup.h" "")
endif()

configure_file(${CMAKE_CURRENT_LIST_DIR}/setup.h.in ${CURRENT_PACKAGES_DIR}/include/wx/setup.h @ONLY)
endif()
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxwidgets)
Expand Down
2 changes: 1 addition & 1 deletion ports/wxwidgets/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wxwidgets",
"version-semver": "3.1.5",
"port-version": 5,
"port-version": 6,
"description": [
"Widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. ",
"Set WXWIDGETS_USE_STL in a custom triplet to build with the wxUSE_STL build option.",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7338,7 +7338,7 @@
},
"wxwidgets": {
"baseline": "3.1.5",
"port-version": 5
"port-version": 6
},
"x-plane": {
"baseline": "3.0.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/w-/wxwidgets.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "79ef97e2255a360a5515d0fbdbb839c15bb12548",
"version-semver": "3.1.5",
"port-version": 6
},
{
"git-tree": "f12ef0e93d9ca2f6d1c8cb4ad3703d98359abacd",
"version-semver": "3.1.5",
Expand Down

0 comments on commit 9b654a1

Please sign in to comment.