X-Git-Url: http://developer.intra2net.com/git/?a=blobdiff_plain;f=python%2FCMakeLists.txt;h=31ef1c699862efc0bc864588c32b1d51843bd9a5;hb=3b3a9614147038b37b69f5c2878841bad1db8af1;hp=1073ed3f1ae29626319022a99a3a8e46956b0046;hpb=9ae4d5f637d4bc0b1bd7845944525370e2c81167;p=libftdi diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 1073ed3..31ef1c6 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -22,11 +22,16 @@ if ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND ) include_directories ( ${PYTHON_INCLUDE_DIRS} ) link_directories ( ${CMAKE_CURRENT_BINARY_DIR}/../src ) + if ( DOCUMENTATION AND DOXYGEN_FOUND ) + set(CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND}) + endif() swig_add_module ( ftdi1 python ftdi1.i ) swig_link_libraries ( ftdi1 ftdi1 ) if ( LINK_PYTHON_LIBRARY ) swig_link_libraries ( ftdi1 ${PYTHON_LIBRARIES} ) + elseif( APPLE ) + set_target_properties ( ${SWIG_MODULE_ftdi1_REAL_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" ) endif () set_target_properties ( ${SWIG_MODULE_ftdi1_REAL_NAME} PROPERTIES NO_SONAME ON ) @@ -46,9 +51,6 @@ if ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND ) install ( TARGETS ${SWIG_MODULE_ftdi1_REAL_NAME} LIBRARY DESTINATION ${PYTHON_MODULE_PATH} ) if ( DOCUMENTATION AND DOXYGEN_FOUND ) - - set(CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND}) - # Run doxygen to only generate the xml add_custom_command ( OUTPUT ${CMAKE_BINARY_DIR}/doc/xml/ftdi_8c.xml COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/doc