Skip to content

Commit

Permalink
Some qt notes
Browse files Browse the repository at this point in the history
  • Loading branch information
alxvth committed Sep 23, 2024
1 parent ef5dce4 commit 44dddf3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions ExampleDependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ find_package(ManiVault COMPONENTS Core PointData CONFIG)
find_package(blake3 CONFIG REQUIRED)

if(NOT APPLE)
find_package(lapack CONFIG REQUIRED) # only for backwards-compatability with cmake < 3.21
find_package(faiss CONFIG REQUIRED)
endif()

Expand Down
16 changes: 12 additions & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,17 @@ def generate(self):
tc.variables["CMAKE_CXX_STANDARD_REQUIRED"] = "ON"

# Use the Qt provided .cmake files
qtpath = pathlib.Path(self.deps_cpp_info["qt"].rootpath)
qt_root = str(list(qtpath.glob("**/Qt6Config.cmake"))[0].parents[3].as_posix())
tc.variables["CMAKE_PREFIX_PATH"] = qt_root
qt_path = pathlib.Path(self.deps_cpp_info["qt"].rootpath)
qt_cfg = list(qt_path.glob("**/Qt6Config.cmake"))[0]
qt_root = str(qt_cfg.parents[0].as_posix())
qt_dir = str(qt_cfg.parents[3].as_posix())

# for Qt >= 6.4.2
#print("Qt6_DIR: ", qt_root)
#tc.variables["Qt6_DIR"] = qt_root

# for Qt < 6.4.2
tc.variables["CMAKE_PREFIX_PATH"] = qt_dir

# 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.
Expand All @@ -114,7 +122,7 @@ def generate(self):

# Set some build options
tc.variables["MV_UNITY_BUILD"] = "ON"

# Install vcpkg dependencies
vcpkg_dir = os.environ["VCPKG_ROOT"]
vcpkg_exe = os.path.join(vcpkg_dir, "vcpkg.exe") if self.settings.os == "Windows" else os.path.join(vcpkg_dir, "vcpkg")
Expand Down

0 comments on commit 44dddf3

Please sign in to comment.