Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use file(RELATIVE_PATH ...) so we don't need 3.20 #2227

Merged
merged 1 commit into from Mar 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions CMakeLists.txt
Expand Up @@ -66,9 +66,12 @@ endif()
# Get the relative path from the tomviz executable install location
# (INSTALL_RUNTIME_DIR) to the python install dir (tomviz_python_install_dir).
# Tomviz will use this when it starts to find the python packages.
cmake_path(RELATIVE_PATH tomviz_python_install_dir
BASE_DIRECTORY "${INSTALL_RUNTIME_DIR}"
OUTPUT_VARIABLE tomviz_path_from_exe_to_python_install_dir)
# Note: The paths need to be absolute so we just prefix them with the directory
# separator
file(RELATIVE_PATH
tomviz_path_from_exe_to_python_install_dir
"/${INSTALL_RUNTIME_DIR}"
"/${tomviz_python_install_dir}")

# Add our CMake modules to the search path.
set(CMAKE_MODULE_PATH "${tomviz_SOURCE_DIR}/cmake")
Expand Down