diff --git a/CMakeLists.txt b/CMakeLists.txt index 04d00ed..31c0731 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,9 @@ set (CMAKE_SWIG_FLAGS "") option (GTEST "Build all gtests." OFF) option (BUILDDOC "Build all doc." OFF) +option (BUILDSWIG "Build swig modules." ON) +option (BUILDSWIGPYTHON "Build swig python modules." ON) +option (BUILDSWIGNODE "Build swig node modules." ON) if (GTEST) enable_testing () diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ff717a3..ae940fe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -50,10 +50,16 @@ if (DOXYGEN_FOUND) endforeach () endif () -find_package (SWIG) -if (SWIG_FOUND) - include (${SWIG_USE_FILE}) +if (BUILDSWIG) + find_package (SWIG) + if (SWIG_FOUND) + include (${SWIG_USE_FILE}) - add_subdirectory (python) - add_subdirectory (javascript) + if (BUILDSWIGPYTHON) + add_subdirectory (python) + endif () + if (BUILDSWIGNODE) + add_subdirectory (javascript) + endif () + endif () endif ()