Exclude >= 2.8.3 from reimplementation of CMAKE_CURRENT_LIST_DIR
This avoids violation of possible future CMake policy checks regarding reserved/read-only variables.
This commit is contained in:
parent
9665e08bac
commit
c2944dbc0c
@ -47,9 +47,11 @@ endif()
|
|||||||
|
|
||||||
if(NOT TARGET opencv_core)
|
if(NOT TARGET opencv_core)
|
||||||
# Extract directory name from full path of the file currently being processed.
|
# Extract directory name from full path of the file currently being processed.
|
||||||
# Note that CMake 2.8.3 introduced CMAKE_CURRENT_LIST_DIR, but we do this
|
# Note that CMake 2.8.3 introduced CMAKE_CURRENT_LIST_DIR. We reimplement it
|
||||||
# manually to support older versions of CMake as well.
|
# for older versions of CMake to support these as well.
|
||||||
|
if(CMAKE_VERSION VERSION_LESS "2.8.3")
|
||||||
get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||||
|
endif()
|
||||||
|
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules${OpenCV_MODULES_SUFFIX}.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules${OpenCV_MODULES_SUFFIX}.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user