Skip to content

Commit

Permalink
Maybe like this
Browse files Browse the repository at this point in the history
  • Loading branch information
alxvth committed Sep 20, 2024
1 parent 6d92a36 commit e1d09b1
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC

def generate_vcpkg(self):
# Install vcpkg dependencies
self.vcpkg_dir = os.environ["VCPKG_ROOT"]
print("vcpkg_dir: ", vcpkg_dir)
self.vcpkg_exe = f"{self.vcpkg_dir}/vcpkg.exe" if self.settings.os == "Windows" else f"{self.vcpkg_dir}/vcpkg"
self.run(f"{self.vcpkg_exe} install --manifest")

def generate(self):
generator = None
if self.settings.os == "Macos":
Expand Down Expand Up @@ -115,19 +122,13 @@ def generate(self):
# Set some build options
tc.variables["MV_UNITY_BUILD"] = "ON"

tc.generate()
# vcpkg settings
tc.variables["CMAKE_PROJECT_INCLUDE "] = os.path.join(self.vcpkg_dir, "scripts", "buildsystems", "vcpkg.cmake")

# 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")
tc.generate()

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 e1d09b1

Please sign in to comment.