diff --git a/recipes/sdf/all/test_package/CMakeLists.txt b/recipes/sdf/all/test_package/CMakeLists.txt index afcf11bbd8776..0e0a1b879f436 100644 --- a/recipes/sdf/all/test_package/CMakeLists.txt +++ b/recipes/sdf/all/test_package/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.1) project(test_package LANGUAGES C) find_package(sdf REQUIRED CONFIG) -find_package(stb REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE sdf::sdf stb::stb) +target_link_libraries(${PROJECT_NAME} PRIVATE sdf::sdf) diff --git a/recipes/sdf/all/test_package/conanfile.py b/recipes/sdf/all/test_package/conanfile.py index ad5b8f9465ed6..0a6bc68712d90 100644 --- a/recipes/sdf/all/test_package/conanfile.py +++ b/recipes/sdf/all/test_package/conanfile.py @@ -14,7 +14,6 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) - self.requires("stb/cci.20210910") def build(self): cmake = CMake(self) @@ -24,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - img_path = os.path.join(self.source_folder, "test.png") - self.run(f"{bin_path} {img_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/sdf/all/test_package/test.png b/recipes/sdf/all/test_package/test.png deleted file mode 100644 index 568aa3449320a..0000000000000 Binary files a/recipes/sdf/all/test_package/test.png and /dev/null differ diff --git a/recipes/sdf/all/test_package/test_package.c b/recipes/sdf/all/test_package/test_package.c index 808fd873709a9..01f233e85fca3 100644 --- a/recipes/sdf/all/test_package/test_package.c +++ b/recipes/sdf/all/test_package/test_package.c @@ -3,35 +3,14 @@ #define SDF_IMPLEMENTATION #include "sdf.h" -#define STB_IMAGE_IMPLEMENTATION -#include "stb_image.h" - int main(int argc, char **argv) { - if (argc < 2) { - fprintf(stderr, "Need at least one argument\n"); - return 1; - } - - int width, height, bpp; - unsigned char* img_data = stbi_load(argv[1], &width, &height, &bpp, 0); - if(img_data == NULL) - { - fprintf(stderr, "Could not load image: %s\n", stbi_failure_reason()); - return 1; - } - - unsigned char* dest_data = malloc(width * height * bpp); - if(dest_data == NULL) - { - stbi_image_free(img_data); - return 1; - } - - sdfBuildDistanceField(dest_data, width, 2.0f, img_data, width, height, width); + unsigned char* dest_data = malloc(0); + int result = sdfBuildDistanceField(dest_data, 0, 2.0f, NULL, 0, 0, 0); + printf("Result: %d\n", result); + printf("Test"); free(dest_data); - stbi_image_free(img_data); return 0; } diff --git a/recipes/sdf/all/test_v1_package/CMakeLists.txt b/recipes/sdf/all/test_v1_package/CMakeLists.txt index ee4e3e06a56c5..a27e3332baf0d 100644 --- a/recipes/sdf/all/test_v1_package/CMakeLists.txt +++ b/recipes/sdf/all/test_v1_package/CMakeLists.txt @@ -5,7 +5,6 @@ include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) find_package(sdf REQUIRED CONFIG) -find_package(stb REQUIRED CONFIG) add_executable(${PROJECT_NAME} ../test_package/test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE sdf::sdf stb::stb) +target_link_libraries(${PROJECT_NAME} PRIVATE sdf::sdf) diff --git a/recipes/sdf/all/test_v1_package/conanfile.py b/recipes/sdf/all/test_v1_package/conanfile.py index 855f0ca3462a1..38f4483872d47 100644 --- a/recipes/sdf/all/test_v1_package/conanfile.py +++ b/recipes/sdf/all/test_v1_package/conanfile.py @@ -6,9 +6,6 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" - def requirements(self): - self.requires("stb/cci.20210910") - def build(self): cmake = CMake(self) cmake.configure() @@ -17,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - img_path = os.path.join(self.source_folder, os.pardir, "test_package", "test.png") - self.run(f"{bin_path} {img_path}", run_environment=True) + self.run(bin_path, run_environment=True)