swig: add BUILDSWIG macros to disable building of swig modules
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -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 ()
|
||||
|
||||
@@ -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 ()
|
||||
|
||||
Reference in New Issue
Block a user