Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ParaView
ParaView
Commits
d4f96d3e
Commit
d4f96d3e
authored
Dec 05, 2018
by
Sebastien Jourdain
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use NONRELOCATABLE_INSTALL to track PREFIX_PATH in config
parent
04d2b0c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
CMakeLists.txt
CMakeLists.txt
+15
-1
ParaViewConfig.cmake.in
ParaViewConfig.cmake.in
+15
-0
No files found.
CMakeLists.txt
View file @
d4f96d3e
...
...
@@ -124,7 +124,7 @@ if (CMAKE_CROSSCOMPILING
AND NOT PARAVIEW_COMPILE_TOOLS_IMPORTED
AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR
AND CMAKE_VERSION VERSION_LESS 3.8
)
# if CMAKE_CROSSCOMPILING is true and full crosscompiling support is not available
# if CMAKE_CROSSCOMPILING is true and full crosscompiling support is not available
# we need to import build-tools targets.
find_package
(
ParaViewCompileTools REQUIRED
)
# this keeps VTK sub-dir from trying to import VTKCompileTools.
...
...
@@ -829,11 +829,25 @@ endforeach()
# We create two versions of ParaViewConfig.cmake for the build tree and the
# install tree.
# When PARAVIEW_NONRELOCATABLE_INSTALL=ON we add to ParaViewConfig.cmake
# set(PARAVIEW_PREFIX_PATH "${CMAKE_PREFIX_PATH}")
option
(
PARAVIEW_NONRELOCATABLE_INSTALL
"Capture CMAKE_PREFIX_PATH in Config.cmake file for external project"
OFF
)
mark_as_advanced
(
PARAVIEW_NONRELOCATABLE_INSTALL
)
set
(
paraview_prefix_path
"
${
CMAKE_PREFIX_PATH
}
"
)
# For build tree.
set
(
PARAVIEW_CONFIG_INSTALLED FALSE
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/ParaViewConfig.cmake.in
${
CMAKE_CURRENT_BINARY_DIR
}
/ParaViewConfig.cmake @ONLY
)
if
(
NOT PARAVIEW_NONRELOCATABLE_INSTALL
)
set
(
paraview_prefix_path
)
endif
()
set
(
PARAVIEW_CONFIG_INSTALLED TRUE
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/ParaViewConfig.cmake.in
${
CMAKE_CURRENT_BINARY_DIR
}
/CMakeFiles/ParaViewConfig.cmake @ONLY
)
...
...
ParaViewConfig.cmake.in
View file @
d4f96d3e
...
...
@@ -17,6 +17,14 @@ else()
set (PARAVIEW_CONFIG_TARGETS_FILE "@ParaView_BINARY_DIR@/ParaViewTargets.cmake")
endif()
#------------------------------------------------------------------------------
# Update CMAKE_PREFIX_PATH locally when PARAVIEW_NONRELOCATABLE_INSTALL=ON
#------------------------------------------------------------------------------
set(PARAVIEW_PREFIX_PATH "@paraview_prefix_path@")
set(CMAKE_PREFIX_PATH_save "${CMAKE_PREFIX_PATH}")
list(APPEND CMAKE_PREFIX_PATH "${PARAVIEW_PREFIX_PATH}")
#------------------------------------------------------------------------------
# Version information for ParaView
SET(PARAVIEW_VERSION_MAJOR "@PARAVIEW_VERSION_MAJOR@")
...
...
@@ -122,3 +130,10 @@ endif()
# cleanup
unset(__pv_install_tree)
#------------------------------------------------------------------------------
# restore CMAKE_PREFIX_PATH
#------------------------------------------------------------------------------
set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH_save}")
unset(CMAKE_PREFIX_PATH_save)
Scott Wittenburg
@scott.wittenburg
mentioned in commit
51b8ac52
·
Dec 05, 2018
mentioned in commit
51b8ac52
mentioned in commit 51b8ac520e97233ec3a1a9edc2a2f0238f8e4efa
Toggle commit list
Scott Wittenburg
@scott.wittenburg
mentioned in commit
4848cbd6
·
Dec 05, 2018
mentioned in commit
4848cbd6
mentioned in commit 4848cbd63aebce55cdc22071616a488c6d91b627
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment