From: Eneas U de Queiroz Date: Tue, 31 Jul 2018 20:44:57 +0000 (-0300) Subject: CMake: use find_package (SWIG) for cmake >= 3.0.0 X-Git-Tag: v1.5rc1~30 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=fcda9c6a208d3a7fe651ef661b2eb6e462a89c17;hp=91dbb659016da3166c3e11bb8f83d7aa5b93f4d6 CMake: use find_package (SWIG) for cmake >= 3.0.0 There's a workaround for a bug (fixed in cmake 3.0.0) that does not work in CMake 3.12. Only use the workaround with cmake < 3.0.0. Signed-off-by: Eneas U de Queiroz --- diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 4843396..7bdd9f9 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,5 +1,5 @@ # workaround for cmake bug #0013449 -if ( NOT DEFINED CMAKE_FIND_ROOT_PATH ) +if ( NOT DEFINED CMAKE_FIND_ROOT_PATH OR CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.0 ) find_package ( SWIG REQUIRED ) else () find_program ( SWIG_EXECUTABLE NAMES swig2.0 swig )