diff --git a/conanfile.py b/conanfile.py index 174bbe5..c1e3fe4 100644 --- a/conanfile.py +++ b/conanfile.py @@ -32,7 +32,7 @@ class FimdlpConan(ConanFile): # Sources are located in the same place as this recipe, copy them to the recipe exports_sources = "CMakeLists.txt", "src/*", "sample/*", "tests/*", "config/*", "fimdlpConfig.cmake.in" - def init(self): + def set_version(self): content = load(self, "CMakeLists.txt") version_pattern = re.compile(r'project\s*\([^\)]*VERSION\s+([0-9]+\.[0-9]+\.[0-9]+)', re.IGNORECASE | re.DOTALL) match = version_pattern.search(content) diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index 57b4282..a857256 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.20) project(test_fimdlp) find_package(fimdlp REQUIRED) +find_package(Torch REQUIRED) add_executable(test_fimdlp src/test_fimdlp.cpp) -target_link_libraries(test_fimdlp fimdlp::fimdlp) +target_link_libraries(test_fimdlp fimdlp::fimdlp torch::torch) target_compile_features(test_fimdlp PRIVATE cxx_std_17) \ No newline at end of file diff --git a/test_package/CMakeUserPresets.json b/test_package/CMakeUserPresets.json new file mode 100644 index 0000000..402e164 --- /dev/null +++ b/test_package/CMakeUserPresets.json @@ -0,0 +1,9 @@ +{ + "version": 4, + "vendor": { + "conan": {} + }, + "include": [ + "build/gcc-14-x86_64-gnu17-release/generators/CMakePresets.json" + ] +} \ No newline at end of file