diff options
| author | ruki <[email protected]> | 2026-02-10 14:25:22 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-10 14:25:22 +0800 |
| commit | ee98b61be7054e1b8b8e2668b67c662ba12e264b (patch) | |
| tree | 5c6ec007c96c904d514b97a652923a1c7ef8977a /tests/projects | |
| parent | d481d13b1c8c8536de5919104b99e43e0b1bb263 (diff) | |
| parent | 85b9b630211b2689df96716d1fe677aeb5d9fd6a (diff) | |
Merge pull request #7299 from 138436724/vcpkgdepend
fix: attempt to add dependency handling for vcpkg
Diffstat (limited to 'tests/projects')
| -rw-r--r-- | tests/projects/package/vcpkg/.gitignore | 2 | ||||
| -rw-r--r-- | tests/projects/package/vcpkg/src/main.cpp | 3 | ||||
| -rw-r--r-- | tests/projects/package/vcpkg/xmake.lua | 2 | ||||
| -rw-r--r-- | tests/projects/package/vcpkg_dependency/.gitignore | 6 | ||||
| -rw-r--r-- | tests/projects/package/vcpkg_dependency/src/main.cpp | 20 | ||||
| -rw-r--r-- | tests/projects/package/vcpkg_dependency/xmake.lua | 11 | ||||
| -rw-r--r-- | tests/projects/package/vcpkg_manifest/.gitignore | 2 | ||||
| -rw-r--r-- | tests/projects/package/vcpkg_manifest/src/main.cpp | 3 | ||||
| -rw-r--r-- | tests/projects/package/vcpkg_manifest/xmake.lua | 2 |
9 files changed, 43 insertions, 8 deletions
diff --git a/tests/projects/package/vcpkg/.gitignore b/tests/projects/package/vcpkg/.gitignore index 152105761..d66efff82 100644 --- a/tests/projects/package/vcpkg/.gitignore +++ b/tests/projects/package/vcpkg/.gitignore @@ -4,5 +4,3 @@ build/ # MacOS Cache .DS_Store - - diff --git a/tests/projects/package/vcpkg/src/main.cpp b/tests/projects/package/vcpkg/src/main.cpp index 7c435d251..e64ad9bc2 100644 --- a/tests/projects/package/vcpkg/src/main.cpp +++ b/tests/projects/package/vcpkg/src/main.cpp @@ -2,8 +2,7 @@ using namespace std; -int main(int argc, char** argv) -{ +int main(int argc, char** argv) { cout << "hello world!" << endl; return 0; } diff --git a/tests/projects/package/vcpkg/xmake.lua b/tests/projects/package/vcpkg/xmake.lua index 3f5dbcf55..3abedd205 100644 --- a/tests/projects/package/vcpkg/xmake.lua +++ b/tests/projects/package/vcpkg/xmake.lua @@ -1,3 +1,5 @@ +add_rules("mode.debug", "mode.release") + add_requires("vcpkg::zlib", "vcpkg::pcre2") add_requires("vcpkg::boost[core]", {alias = "boost"}) diff --git a/tests/projects/package/vcpkg_dependency/.gitignore b/tests/projects/package/vcpkg_dependency/.gitignore new file mode 100644 index 000000000..d66efff82 --- /dev/null +++ b/tests/projects/package/vcpkg_dependency/.gitignore @@ -0,0 +1,6 @@ +# Xmake cache +.xmake/ +build/ + +# MacOS Cache +.DS_Store diff --git a/tests/projects/package/vcpkg_dependency/src/main.cpp b/tests/projects/package/vcpkg_dependency/src/main.cpp new file mode 100644 index 000000000..4955734dc --- /dev/null +++ b/tests/projects/package/vcpkg_dependency/src/main.cpp @@ -0,0 +1,20 @@ +#include <OpenColorIO/OpenColorIO.h> +#include <OpenImageIO/imageio.h> +#include <boost/system/error_code.hpp> +#include <boost/filesystem.hpp> + +int main(int argc, char **argv) { + // test for opencolorio, opencolorio is one of the dependencies of openimageio. + auto transform = OCIO_NAMESPACE::ColorSpaceTransform::Create(); + + // test for openimageio. + auto write_image = OIIO::ImageInput::open("test.png"); + + // test for boost-system, boost-system is one of the dependencies of boost-filesystem. + boost::system::error_code ec; + + // test for boost-filesystem. + boost::filesystem::exists("test.png", ec); + + return 0; +} diff --git a/tests/projects/package/vcpkg_dependency/xmake.lua b/tests/projects/package/vcpkg_dependency/xmake.lua new file mode 100644 index 000000000..d309a3fc3 --- /dev/null +++ b/tests/projects/package/vcpkg_dependency/xmake.lua @@ -0,0 +1,11 @@ +add_rules("mode.debug", "mode.release") + +add_requires("vcpkg::openimageio[jpegxl,libraw,webp]", { configs = { shared = true } }) +add_requires("vcpkg::boost-filesystem", { alias = "filesystem" }) + +target("test") + set_kind("binary") + add_files("src/*.cpp") + set_languages("c++17") + set_encodings("utf-8") + add_packages("vcpkg::openimageio[jpegxl,libraw,webp]", "filesystem") diff --git a/tests/projects/package/vcpkg_manifest/.gitignore b/tests/projects/package/vcpkg_manifest/.gitignore index 152105761..d66efff82 100644 --- a/tests/projects/package/vcpkg_manifest/.gitignore +++ b/tests/projects/package/vcpkg_manifest/.gitignore @@ -4,5 +4,3 @@ build/ # MacOS Cache .DS_Store - - diff --git a/tests/projects/package/vcpkg_manifest/src/main.cpp b/tests/projects/package/vcpkg_manifest/src/main.cpp index 7c435d251..e64ad9bc2 100644 --- a/tests/projects/package/vcpkg_manifest/src/main.cpp +++ b/tests/projects/package/vcpkg_manifest/src/main.cpp @@ -2,8 +2,7 @@ using namespace std; -int main(int argc, char** argv) -{ +int main(int argc, char** argv) { cout << "hello world!" << endl; return 0; } diff --git a/tests/projects/package/vcpkg_manifest/xmake.lua b/tests/projects/package/vcpkg_manifest/xmake.lua index 8a851328b..0814b817e 100644 --- a/tests/projects/package/vcpkg_manifest/xmake.lua +++ b/tests/projects/package/vcpkg_manifest/xmake.lua @@ -1,3 +1,5 @@ +add_rules("mode.debug", "mode.release") + add_requires("vcpkg::zlib 1.2.11+10") add_requires("vcpkg::fmt >=8.0.1", {configs = {baseline = "50fd3d9957195575849a49fa591e645f1d8e7156"}}) add_requires("vcpkg::libpng", {configs = {features = {"apng"}}}) |
