Skip to content

Commit

Permalink
Use file(RELATIVE_PATH ...) so we don't need 3.20
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Harris <chris.harris@kitware.com>
  • Loading branch information
cjh1 committed Mar 1, 2022
1 parent 0a90367 commit f27ea97
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Expand Up @@ -66,9 +66,14 @@ 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}")

message("${tomviz_path_from_exe_to_python_install_dir}")

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

0 comments on commit f27ea97

Please sign in to comment.