libftdi Archives
|
From: | Richard Shaw <hobbes1069@xxxxxxxxx> |
---|---|
To: | libftdi@xxxxxxxxxxxxxxxxxxxxxxx |
Date: | Sun, 17 Feb 2019 09:02:38 -0600 |
libftdi was FTBFS[1] in Fedora Rawhide after a GCC 9.0.X mass rebuild but the problem turned out to be behavior changes[2] in CMake with regards to SWIG[3]. The UseSWIG module will now use standard target names and not generate the SWIG_MODULE_<target>_REAL_NAME variable. I applied the following patch which appears to have solved the problem for now. $ cat libftdi-cmake_swig.patch --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,3 +1,7 @@ +# swig_add_module is deprecated and SWIG_MODULE_<target>_REAL_NAME is no +# longer set by default so set policy to the old behavior. +cmake_policy(SET CMP0078 OLD) + option ( PYTHON_BINDINGS "Build python bindings via swig" ON ) option ( LINK_PYTHON_LIBRARY "Link against python libraries" ON ) @@ -24,8 +28,9 @@ if ( SWIG_FOUND AND PYTHONLIBS_FOUND AND if ( DOCUMENTATION AND DOXYGEN_FOUND ) set(CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND}) + set_property(SOURCE ftdi1.i PROPERTY DEPENDS ftdi1_doc.i) endif() - swig_add_module ( ftdi1 python ftdi1.i ) + swig_add_library ( ftdi1 LANGUAGE python SOURCES ftdi1.i ) swig_link_libraries ( ftdi1 ftdi1 ) if ( LINK_PYTHON_LIBRARY ) --- Thanks, Richard libftdi - see http://www.intra2net.com/en/developer/libftdi for details. |
Current Thread |
---|
|