From fd0db31b3d1cda4c7ef263a4c9338f42217e8eb2 Mon Sep 17 00:00:00 2001 From: Ingmar Vanhassel Date: Thu, 29 Oct 2009 15:13:17 +0100 Subject: Add a CMake option to disable python bindings --- CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4b1f46..4055ad3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,9 +17,14 @@ ENDIF(NOT DEFINED CMAKE_INSTALL_LIBDIR) FIND_PACKAGE( LibXml2 REQUIRED ) FIND_PACKAGE( GLIB2 REQUIRED ) -FIND_PACKAGE( SWIG ) -FIND_PACKAGE( PythonInterp ) -FIND_PACKAGE( PythonLibs ) + +OPTION(ENABLE_PYTHON "Enable Python bindings (needs Swig)" ON) + +IF(ENABLE_PYTHON) + FIND_PACKAGE( SWIG ) + FIND_PACKAGE( PythonInterp ) + FIND_PACKAGE( PythonLibs ) +ENDIF(ENABLE_PYTHON) INCLUDE_DIRECTORIES( "${CMAKE_CURRENT_SOURCE_DIR}/include" ) -- cgit v1.1-32-gdbae