You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Use if(POLICY)
I somehow missed that `if(POLICY CMPxxxx)` exists to wrap `cmp_policy()` calls so only CMake versions that understand that policy attempt to set it. Which is way smarter than the version-based logic I was using.
This commit is contained in:
@@ -30,10 +30,10 @@ FIND_PACKAGE(SWIG 2.0 REQUIRED)
|
||||
INCLUDE(${SWIG_USE_FILE})
|
||||
|
||||
### Enable some legacy SWIG behaviors, in newer CMAKEs
|
||||
if (CMAKE_VERSION VERSION_GREATER 3.13)
|
||||
if (POLICY CMP0078)
|
||||
cmake_policy(SET CMP0078 OLD)
|
||||
endif()
|
||||
if (CMAKE_VERSION VERSION_GREATER 3.14)
|
||||
if (POLICY CMP0086)
|
||||
cmake_policy(SET CMP0086 OLD)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ FIND_PACKAGE(SWIG 2.0 REQUIRED)
|
||||
INCLUDE(${SWIG_USE_FILE})
|
||||
|
||||
### Enable some legacy SWIG behaviors, in newer CMAKEs
|
||||
if (CMAKE_VERSION VERSION_GREATER 3.13)
|
||||
if (POLICY CMP0078)
|
||||
cmake_policy(SET CMP0078 OLD)
|
||||
endif()
|
||||
if (CMAKE_VERSION VERSION_GREATER 3.14)
|
||||
if (POLICY CMP0086)
|
||||
cmake_policy(SET CMP0086 OLD)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user