diff options
| author | FireFight <[email protected]> | 2026-02-08 20:16:38 +0800 |
|---|---|---|
| committer | FireFight <[email protected]> | 2026-02-08 20:16:38 +0800 |
| commit | 0ec3e11de6b03a3ffca30da5cf0e49d5052893a4 (patch) | |
| tree | d79179de28e5728f1b04329f2d37c85e1080e55e | |
| parent | e80c35330d2df64d4b0e70f4181a39a06af0581b (diff) | |
fix vcpkg tests
| -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/src/main.cpp | 26 | ||||
| -rw-r--r-- | tests/projects/package/vcpkg_dependency/xmake.lua | 8 | ||||
| -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 |
8 files changed, 26 insertions, 22 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/src/main.cpp b/tests/projects/package/vcpkg_dependency/src/main.cpp index e5fdd37c5..9a79c7c14 100644 --- a/tests/projects/package/vcpkg_dependency/src/main.cpp +++ b/tests/projects/package/vcpkg_dependency/src/main.cpp @@ -1,16 +1,20 @@ -#include <iostream> -#include <OpenImageIO/imageio.h> -#include <openssl/evp.h> #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-system. + boost::system::error_code ec; -using namespace std; + // test for boost-filesystem. + boost::filesystem::exists("test.png", ec); -int main(int argc, char** argv) -{ - namespace OCIO = OCIO_NAMESPACE; - EVP_MD_CTX* sha256 = EVP_MD_CTX_new(); - EVP_DigestInit_ex(sha256, EVP_sha256(), nullptr); - auto write_image = OIIO::ImageOutput::create("test.png"); - cout << "hello world!" << endl; return 0; } diff --git a/tests/projects/package/vcpkg_dependency/xmake.lua b/tests/projects/package/vcpkg_dependency/xmake.lua index 2cccc00e7..ac4950c4c 100644 --- a/tests/projects/package/vcpkg_dependency/xmake.lua +++ b/tests/projects/package/vcpkg_dependency/xmake.lua @@ -1,10 +1,12 @@ set_languages("c++17") set_encodings("utf-8") -add_requires("vcpkg::openimageio", { configs = { shared = true } }) -add_requires("vcpkg::openssl[ssl3]", { configs = { shared = true } }) +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") - add_packages("vcpkg::openimageio", "vcpkg::openssl[ssl3]")
\ No newline at end of file + 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"}}}) |
