From: Frank Dana Date: Thu, 26 Sep 2019 18:57:25 +0000 (-0400) Subject: Simplify CMake policy guard X-Git-Tag: v1.5rc1~18 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=bd825872f55f060073b25f53c589d22db70cf338 Simplify CMake policy guard Signed-off-by: FeRD (Frank Dana) --- diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 494f6ff..4f758d5 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,7 +1,7 @@ -# swig_add_library behavior changed in cmake 3.13 and SWIG_MODULE__REAL_NAME -# is no longer set by default so set policy to the old behavior. -if(NOT CMAKE_VERSION VERSION_LESS 3.13.0) - cmake_policy(SET CMP0078 OLD) +# swig_add_library behavior changed in cmake 3.13 to no longer set +# SWIG_MODULE__REAL_NAME, so restore the old behavior. +if ( POLICY CMP0078 ) + cmake_policy( SET CMP0078 OLD ) endif () # workaround for cmake bug #0013449