Skip to content

Commit

Permalink
Test vcpkg install
Browse files Browse the repository at this point in the history
  • Loading branch information
alxvth committed Sep 20, 2024
1 parent 520dffd commit 6d92a36
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6d92a36

Please sign in to comment.