Skip to content

Commit

Permalink
Add MV_INSTALL_DIR variable through conan
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianThijssen committed Oct 11, 2023
1 parent 52b2477 commit 61787bd
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ def generate(self):
if self.settings.os == "Linux" or self.settings.os == "Macos":
tc.variables["CMAKE_CXX_STANDARD_REQUIRED"] = "ON"
tc.variables["CMAKE_PREFIX_PATH"] = qt_root

# Set the installation directory for ManiVault based on the MV_INSTALL_DIR environment variable
# or if none is specified, set it to the build/install dir.
if not os.environ.get("MV_INSTALL_DIR", None):
os.environ["MV_INSTALL_DIR"] = os.path.join(self.build_folder, "install")
print("MV_INSTALL_DIR: ", os.environ["MV_INSTALL_DIR"])
self.install_dir = pathlib.Path(os.environ["MV_INSTALL_DIR"]).as_posix()
# Give the installation directory to CMake
tc.variables["MV_INSTALL_DIR"] = self.install_dir

tc.generate()

def _configure_cmake(self):
Expand All @@ -104,11 +114,6 @@ def _configure_cmake(self):

def build(self):
print("Build OS is : ", self.settings.os)
# If the user has no preference in HDPS_INSTALL_DIR simply set the install dir
if not os.environ.get("HDPS_INSTALL_DIR", None):
os.environ["HDPS_INSTALL_DIR"] = os.path.join(self.build_folder, "install")
print("HDPS_INSTALL_DIR: ", os.environ["HDPS_INSTALL_DIR"])
self.install_dir = os.environ["HDPS_INSTALL_DIR"]

# The ExamplePlugins build expects the HDPS package to be in this install dir
hdps_pkg_root = self.deps_cpp_info["hdps-core"].rootpath
Expand Down

0 comments on commit 61787bd

Please sign in to comment.