aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/scripts/boost/post-source-stubs
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/scripts/boost/post-source-stubs
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/scripts/boost/post-source-stubs')
-rw-r--r--vcpkg/scripts/boost/post-source-stubs/build.cmake43
-rw-r--r--vcpkg/scripts/boost/post-source-stubs/cmake.cmake19
2 files changed, 62 insertions, 0 deletions
diff --git a/vcpkg/scripts/boost/post-source-stubs/build.cmake b/vcpkg/scripts/boost/post-source-stubs/build.cmake
new file mode 100644
index 0000000..796584e
--- /dev/null
+++ b/vcpkg/scripts/boost/post-source-stubs/build.cmake
@@ -0,0 +1,43 @@
+# This fixes the lib path to use desktop libs instead of uwp -- TODO: improve this with better "host" compilation
+string(REPLACE "\\store\\;" "\\;" LIB "$ENV{LIB}")
+set(ENV{LIB} "${LIB}")
+
+file(COPY
+ ${SOURCE_PATH}/
+ DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build
+)
+
+file(READ "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" _contents)
+string(REPLACE " /ZW /EHsc " "" _contents "${_contents}")
+string(REPLACE "-nologo" "" _contents "${_contents}")
+string(REPLACE "/nologo" "" _contents "${_contents}")
+string(REPLACE "/Zm800" "" _contents "${_contents}")
+string(REPLACE "<define>_WIN32_WINNT=0x0602" "" _contents "${_contents}")
+file(WRITE "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" "${_contents}")
+
+message(STATUS "Bootstrapping...")
+if(CMAKE_HOST_WIN32)
+ if(VCPKG_TARGET_IS_MINGW)
+ set(TOOLSET mingw)
+ else()
+ set(TOOLSET msvc)
+ endif()
+ vcpkg_execute_required_process(
+ COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" ${TOOLSET}
+ WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build
+ LOGNAME bootstrap-${TARGET_TRIPLET}
+ )
+else()
+ vcpkg_execute_required_process(
+ COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.sh"
+ WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build
+ LOGNAME bootstrap-${TARGET_TRIPLET}
+ )
+endif()
+
+vcpkg_download_distfile(BOOST_LICENSE
+ URLS "https://raw.githubusercontent.com/boostorg/boost/refs/tags/boost-${VERSION}/LICENSE_1_0.txt"
+ FILENAME "boost-${VERSION}-LICENSE_1_0.txt"
+ SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
+)
+vcpkg_install_copyright(FILE_LIST "${BOOST_LICENSE}")
diff --git a/vcpkg/scripts/boost/post-source-stubs/cmake.cmake b/vcpkg/scripts/boost/post-source-stubs/cmake.cmake
new file mode 100644
index 0000000..0480e70
--- /dev/null
+++ b/vcpkg/scripts/boost/post-source-stubs/cmake.cmake
@@ -0,0 +1,19 @@
+# Beta builds contains a text in the version string
+string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" SEMVER_VERSION "${VERSION}")
+configure_file("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.in" "${SOURCE_PATH}/CMakeLists.txt" @ONLY)
+
+vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
+vcpkg_cmake_install()
+
+file(INSTALL "${SOURCE_PATH}/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/boost/cmake-build")
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+
+vcpkg_download_distfile(BOOST_LICENSE
+ URLS "https://raw.githubusercontent.com/boostorg/boost/refs/tags/boost-${VERSION}/LICENSE_1_0.txt"
+ FILENAME "boost-${VERSION}-LICENSE_1_0.txt"
+ SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
+)
+vcpkg_install_copyright(FILE_LIST "${BOOST_LICENSE}")
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")