mirror of
https://github.com/opencv/opencv.git
synced 2025-08-01 02:18:01 +08:00
Enable cmake CMP0077 policy
When building OpenCV as a sub-project using cmake's add_subdirectory() the OpenCV's build options would be overwritten to its default state. With cmake 3.13+ the CMP0077 policy, option() honors previous definitions via set().
This commit is contained in:
parent
8b43861217
commit
2d778434f1
@ -68,6 +68,9 @@ if(POLICY CMP0075)
|
||||
cmake_policy(SET CMP0075 NEW) # CMake 3.12+: Include file check macros honor `CMAKE_REQUIRED_LIBRARIES`
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0077)
|
||||
cmake_policy(SET CMP0077 NEW) # CMake 3.13+: option() honors normal variables.
|
||||
endif()
|
||||
|
||||
#
|
||||
# Configure OpenCV CMake hooks
|
||||
|
Loading…
Reference in New Issue
Block a user