From fdfee60311accfc15144f88a31e5618e6aaee35a Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Tue, 7 Apr 2009 19:30:20 +0200 Subject: [PATCH] cmake support for the new python bindings --- CMakeLists.txt | 1 + bindings/CMakeLists.txt | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) create mode 100644 bindings/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index dbf6052..9203c82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,7 @@ endif(${UNIX}) add_subdirectory(src) add_subdirectory(ftdipp) +add_subdirectory(bindings) add_subdirectory(examples) add_subdirectory(packages) diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt new file mode 100644 index 0000000..5d1061e --- /dev/null +++ b/bindings/CMakeLists.txt @@ -0,0 +1,15 @@ +include(FindSWIG) +include(FindPythonLibs) +include(UseSWIG) + +if(SWIG_FOUND) +if(PYTHONLIBS_FOUND) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../src) + INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) + + SWIG_ADD_MODULE(ftdi python ftdi.i) + SWIG_LINK_LIBRARIES(ftdi ${PYTHON_LIBRARIES}) + + message(STATUS "Building python bindings via swig") +endif(PYTHONLIBS_FOUND) +endif(SWIG_FOUND) -- 1.7.1