Commit 475abd7a authored by Marcus D. Hanwell's avatar Marcus D. Hanwell

ENH: Added a version support for finding ParaView.

A ParaViewConfigVersion.cmake is installed in the build directory, and
alongside the installed config file, allowing for calls such as
find_package(ParaView 3.8.0) to be used in CMakeLists files.
parent 3549d458
......@@ -348,6 +348,11 @@ CONFIGURE_FILE(
${ParaView_SOURCE_DIR}/ParaViewConfig.cmake.in
${ParaView_BINARY_DIR}/ParaViewConfig.cmake
@ONLY IMMEDIATE)
CONFIGURE_FILE(
${ParaView_SOURCE_DIR}/ParaViewConfigVersion.cmake.in
${ParaView_BINARY_DIR}/ParaViewConfigVersion.cmake
@ONLY IMMEDIATE)
# used by the ParaViewConfig file to determine where the parts of the tree are located relative to the ParaViewConfig file.
set(REL_REF "")
......@@ -451,15 +456,16 @@ IF (NOT PV_INSTALL_NO_DEVELOPMENT)
IF(WIN32)
INSTALL(
FILES "${BUILD_TREE}/CMake/tmp/ParaViewConfig.cmake"
"${BUILD_TREE}/ParaViewConfigVersion.cmake"
DESTINATION .
COMPONENT Development)
ELSE(WIN32)
INSTALL(
FILES "${BUILD_TREE}/CMake/tmp/ParaViewConfig.cmake"
"${BUILD_TREE}/ParaViewConfigVersion.cmake"
DESTINATION ${PV_INSTALL_LIB_DIR}
COMPONENT Development)
ENDIF(WIN32)
ENDIF (NOT PV_INSTALL_NO_DEVELOPMENT)
set(PACKAGE_VERSION @PARAVIEW_VERSION_MAJOR@.@PARAVIEW_VERSION_MINOR@.@PARAVIEW_VERSION_PATCH@)
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if ("${PACKAGE_VERSION}" STREQUAL "${PACKAGE_FIND_VERSION}")
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment