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 (GTEST "Build all gtests." OFF)
|
||||||
option (BUILDDOC "Build all doc." 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)
|
if (GTEST)
|
||||||
enable_testing ()
|
enable_testing ()
|
||||||
|
|||||||
@@ -50,10 +50,16 @@ if (DOXYGEN_FOUND)
|
|||||||
endforeach ()
|
endforeach ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
find_package (SWIG)
|
if (BUILDSWIG)
|
||||||
if (SWIG_FOUND)
|
find_package (SWIG)
|
||||||
include (${SWIG_USE_FILE})
|
if (SWIG_FOUND)
|
||||||
|
include (${SWIG_USE_FILE})
|
||||||
|
|
||||||
add_subdirectory (python)
|
if (BUILDSWIGPYTHON)
|
||||||
add_subdirectory (javascript)
|
add_subdirectory (python)
|
||||||
|
endif ()
|
||||||
|
if (BUILDSWIGNODE)
|
||||||
|
add_subdirectory (javascript)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
Reference in New Issue
Block a user