Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare installation of debug wx-config #3

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions ports/wxwidgets/fix-wx-config-path.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,7 @@ index 441f88c..b3a0531 100644
# Determine the base directories we require.
-prefix=${input_option_prefix-${this_prefix:-@prefix@}}
+base_folder=$(dirname $(readlink -f "$0"))
+prefix=${input_option_prefix-${this_prefix:-${base_folder}/../..}}
+prefix=${input_option_prefix-${this_prefix:-${base_folder}/@VCPKG_RELATIVE_PREFIX@}}
exec_prefix=${input_option_exec_prefix-${input_option_prefix-${this_exec_prefix:-@exec_prefix@}}}
wxconfdir="@libdir@/wx/config"

@@ -1293,7 +1294,7 @@ else
_include_cppflags="-I${includedir}"
fi

-_cppflags=`echo "-I${libdir}/wx/include/@TOOLCHAIN_FULLNAME@" $_include_cppflags "@WXCONFIG_CPPFLAGS@" $_gui_cppflags`
+_cppflags=`echo "-I${prefix}/lib/wx/include/@TOOLCHAIN_FULLNAME@" $_include_cppflags "@WXCONFIG_CPPFLAGS@" $_gui_cppflags`

# now without further ado, we can answer these too.
[ -z "$output_option_cppflags" ] || echo $_cppflags
19 changes: 15 additions & 4 deletions ports/wxwidgets/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ vcpkg_configure_cmake(
-DwxUSE_STL=ON
-DwxBUILD_DISABLE_PLATFORM_LIB_DIR=ON
${OPTIONS}
OPTIONS_RELEASE
-DVCPKG_RELATIVE_PREFIX=../..
OPTIONS_DEBUG
-DVCPKG_RELATIVE_PREFIX=../../../debug
)

vcpkg_install_cmake()
Expand All @@ -48,11 +52,18 @@ vcpkg_copy_pdbs()

vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-wxwidgets TARGET_PATH share/unofficial-wxwidgets)

if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_copy_tools(TOOL_NAMES wxrc AUTO_CLEAN)
else()
vcpkg_copy_tools(TOOL_NAMES wxrc wx-config wxrc-3.1 AUTO_CLEAN)
set(tools wxrc)
if(NOT VCPKG_TARGET_IS_WINDOWS)
list(APPEND tools wx-config wxrc-3.1)
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE)
vcpkg_copy_tools(
TOOL_NAMES ${tools}
SEARCH_DIR "${CURRENT_PACKAGES_DIR}/debug/bin"
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug"
)
endif()
vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/msvc")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
Expand Down