diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/saucer | |
Diffstat (limited to 'vcpkg/ports/saucer')
| -rw-r--r-- | vcpkg/ports/saucer/0001-use-local-packages.patch | 129 | ||||
| -rw-r--r-- | vcpkg/ports/saucer/portfile.cmake | 24 | ||||
| -rw-r--r-- | vcpkg/ports/saucer/vcpkg.json | 33 |
3 files changed, 186 insertions, 0 deletions
diff --git a/vcpkg/ports/saucer/0001-use-local-packages.patch b/vcpkg/ports/saucer/0001-use-local-packages.patch new file mode 100644 index 0000000..a815068 --- /dev/null +++ b/vcpkg/ports/saucer/0001-use-local-packages.patch @@ -0,0 +1,129 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 32fdea7..77892c6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -286,62 +286,30 @@ endif() + include("cmake/nuget.cmake") + include("cmake/module.cmake") + +-CPMFindPackage( +- NAME lockpp +- VERSION 3.0 +- GIT_REPOSITORY "https://github.com/Curve/lockpp" +-) +- +-CPMFindPackage( +- NAME boost_callable_traits +- GIT_TAG boost-1.87.0 +- GIT_REPOSITORY "https://github.com/boostorg/callable_traits" +-) +- +-CPMFindPackage( +- NAME ereignis +- VERSION 4.3 +- GIT_REPOSITORY "https://github.com/Soundux/ereignis" +-) +- +-CPMFindPackage( +- NAME fmt +- GIT_TAG 11.1.1 +- GIT_REPOSITORY "https://github.com/fmtlib/fmt" +-) +- +-CPMFindPackage( +- NAME flagpp +- VERSION 3.0 +- GIT_REPOSITORY "https://github.com/Curve/flagpp" +-) +- +-CPMFindPackage( +- NAME rebind +- VERSION 5.1.1 +- GIT_REPOSITORY "https://github.com/Curve/rebind" +-) +- +-CPMFindPackage( +- NAME poolparty +- VERSION 3.0.1 +- GIT_REPOSITORY "https://github.com/Curve/poolparty" +-) +- +-CPMFindPackage( +- NAME eraser +- VERSION 2.2.1 +- GIT_REPOSITORY "https://github.com/Curve/eraser" +-) +- +-CPMFindPackage( +- NAME boost_preprocessor +- GIT_TAG boost-1.87.0 +- GIT_REPOSITORY "https://github.com/boostorg/preprocessor" +-) +- +-target_link_libraries(${PROJECT_NAME} ${saucer_linkage} boost_preprocessor cr::lockpp cr::flagpp) +-target_link_libraries(${PROJECT_NAME} PUBLIC boost_callable_traits cr::ereignis fmt::fmt cr::rebind cr::poolparty cr::eraser) ++find_path(LOCKPP_INCLUDE_DIRS "lockpp") ++add_library(cr::lockpp INTERFACE IMPORTED) ++target_include_directories(cr::lockpp INTERFACE ${LOCKPP_INCLUDE_DIRS}) ++find_path(FLAGPP_INCLUDE_DIRS "flagpp") ++add_library(cr::flagpp INTERFACE IMPORTED) ++target_include_directories(cr::flagpp INTERFACE ${FLAGPP_INCLUDE_DIRS}) ++find_path(EREIGNIS_INCLUDE_DIRS "ereignis") ++add_library(cr::ereignis INTERFACE IMPORTED) ++target_include_directories(cr::ereignis INTERFACE ${EREIGNIS_INCLUDE_DIRS}) ++find_path(REBIND_INCLUDE_DIRS "rebind") ++add_library(cr::rebind INTERFACE IMPORTED) ++target_include_directories(cr::rebind INTERFACE ${REBIND_INCLUDE_DIRS}) ++find_path(POOLPARTY_INCLUDE_DIRS "poolparty") ++add_library(cr::poolparty INTERFACE IMPORTED) ++target_include_directories(cr::poolparty INTERFACE ${POOLPARTY_INCLUDE_DIRS}) ++find_path(ERASER_INCLUDE_DIRS "eraser") ++add_library(cr::eraser INTERFACE IMPORTED) ++target_include_directories(cr::eraser INTERFACE ${ERASER_INCLUDE_DIRS}) ++ ++find_package(fmt CONFIG REQUIRED) ++find_package(Boost REQUIRED COMPONENTS callable_traits preprocessor) ++ ++target_link_libraries(${PROJECT_NAME} ${saucer_linkage} Boost::preprocessor cr::lockpp cr::flagpp) ++target_link_libraries(${PROJECT_NAME} PUBLIC Boost::callable_traits cr::ereignis fmt::fmt cr::rebind cr::poolparty cr::eraser) + + # -------------------------------------------------------------------------------------------------------- + # Setup Backends +@@ -405,7 +373,7 @@ if (saucer_backend STREQUAL "WebView2") + target_compile_definitions(${PROJECT_NAME} PRIVATE UNICODE=1 _UNICODE=1 NOMINMAX=1) + + include("cmake/webview2.cmake") +- target_link_libraries(${PROJECT_NAME} ${saucer_linkage} Shlwapi gdiplus webview2::webview2) ++ target_link_libraries(${PROJECT_NAME} ${saucer_linkage} Dwmapi Shcore Shlwapi gdiplus webview2::webview2) + endif() + + # -------------------------------------------------------------------------------------------------------- +@@ -418,12 +386,8 @@ if (saucer_serializer STREQUAL "Glaze") + ) + + target_sources(${PROJECT_NAME} PRIVATE ${glaze_sources}) +- +- CPMFindPackage( +- NAME glaze +- VERSION 4.2.4 +- GIT_REPOSITORY "https://github.com/stephenberry/glaze" +- ) ++ ++ find_package(glaze CONFIG REQUIRED) + + target_link_libraries(${PROJECT_NAME} PUBLIC glaze::glaze) + endif() +diff --git a/cmake/webview2.cmake b/cmake/webview2.cmake +index 9ee3dbc..7ec2d9f 100644 +--- a/cmake/webview2.cmake ++++ b/cmake/webview2.cmake +@@ -1,7 +1,8 @@ + include("cmake/nuget.cmake") + + if (NOT saucer_prefer_remote) +- find_package(webview2 CONFIG REQUIRED) ++ find_package(unofficial-webview2 CONFIG REQUIRED) ++ add_library(webview2::webview2 ALIAS unofficial::webview2::webview2) + return() + endif() + diff --git a/vcpkg/ports/saucer/portfile.cmake b/vcpkg/ports/saucer/portfile.cmake new file mode 100644 index 0000000..9b70f58 --- /dev/null +++ b/vcpkg/ports/saucer/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO saucer/saucer + REF "v${VERSION}" + SHA512 083b92079bf324fb9e50b3d6291ee3654b8e4e2926c292c9dc092b1c4ce336ce4d4bbea7e14d52291340c692887b8ab92d1f9f3d50aed6092b5465242572bfdc + HEAD_REF dev + PATCHES + 0001-use-local-packages.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -Dsaucer_no_polyfill=ON + -Dsaucer_prefer_remote=OFF + -DCPM_USE_LOCAL_PACKAGES=ON +) +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/vcpkg/ports/saucer/vcpkg.json b/vcpkg/ports/saucer/vcpkg.json new file mode 100644 index 0000000..468127e --- /dev/null +++ b/vcpkg/ports/saucer/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "saucer", + "version": "6.0.1", + "port-version": 1, + "description": "Next-gen desktop apps with web-frontend in C++", + "homepage": "https://saucer.github.io/", + "license": "MIT", + "supports": "!android & !uwp", + "dependencies": [ + "boost-callable-traits", + "boost-preprocessor", + "eraser", + "ereignis", + "flagpp", + "fmt", + "glaze", + { + "name": "gtk", + "platform": "linux" + }, + "lockpp", + "poolparty", + "rebind", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "webview2", + "platform": "windows" + } + ] +} |