diff --git a/conanfile.py b/conanfile.py index 387b2a4..f3d22f0 100644 --- a/conanfile.py +++ b/conanfile.py @@ -115,13 +115,19 @@ def generate(self): # Set some build options tc.variables["MV_UNITY_BUILD"] = "ON" - tc.variables["CMAKE_TOOLCHAIN_FILE"] = os.environ.get("VCPKG_ROOT", None) + '/scripts/buildsystems/vcpkg.cmake/' - tc.variables["CMAKE_PROJECT_INCLUDE"] = "build/conan_toolchain.cmake" - tc.generate() + # Install vcpkg dependencies + vcpkg_dir = os.environ["VCPKG_ROOT"] + print("vcpkg_dir: ", vcpkg_dir) + #vcpkg_exe = f"{vcpkg_dir}/vcpkg.exe" if self.settings.os == "Windows" else f"{vcpkg_dir}/vcpkg" + #self.run(f"{vcpkg_exe} install --manifest") + def _configure_cmake(self): cmake = CMake(self) + # Set Conan's toolchain with CMAKE_PROJECT_INCLUDE to include Conan toolchain early + cmake.definitions["CMAKE_PROJECT_INCLUDE"] = os.path.join(self.build_folder, "conan_toolchain.cmake") + cmake.definitions["CMAKE_TOOLCHAIN_FILE"] = os.path.join(os.environ["VCPKG_ROOT"], "vcpkg/scripts/buildsystems/vcpkg.cmake") cmake.configure(build_script_folder="hdps/ExamplePlugins") cmake.verbose = True return cmake