X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=python%2FCMakeLists.txt;h=fc1c3d148aa7ad821a4cfd891121cb188ea6769e;hp=494f6ff87806b5bdcce40cd292aa6e9a1fc4770b;hb=07bdc1ea16ac4b38847b773619a7a840a8cd5dd7;hpb=41871ae234838d2540fc4297295fbec71f57067d diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 494f6ff..fc1c3d1 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 @@ -24,6 +24,8 @@ link_directories ( ${CMAKE_CURRENT_BINARY_DIR}/../src ) if ( DOCUMENTATION ) set(CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND}) + # manually add dependency for new cmake / swig versions + set_property(SOURCE ftdi1.i PROPERTY DEPENDS ftdi1_doc.i) endif() if(NOT CMAKE_VERSION VERSION_LESS 3.8.0) swig_add_library ( ftdi1 LANGUAGE python SOURCES ftdi1.i )