Skip to content

Commit

Permalink
Added an option to disable all SWIG bindings at once.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 22, 2011
1 parent 4298d85 commit 2939b26
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Expand Up @@ -358,6 +358,9 @@ ENDIF(PHYSFS_BUILD_TEST)
#CMake's SWIG support is basically useless.
#FIND_PACKAGE(SWIG)

OPTION(PHYSFS_BUILD_SWIG "Build ${_LANG} bindings." TRUE)
MARK_AS_ADVANCED(PHYSFS_BUILD_SWIG)

FIND_PROGRAM(SWIG swig DOC "Path to swig command line app: http://swig.org/")
IF(NOT SWIG)
MESSAGE(STATUS "SWIG not found. You won't be able to build scripting language bindings.")
Expand Down Expand Up @@ -411,7 +414,11 @@ ELSE(NOT SWIG)
ENDMACRO(CONFIGURE_SWIG_BINDING)

MACRO(ADD_SCRIPT_BINDING_OPTION _VAR _LANG _DEFVAL)
OPTION(${_VAR} "Build ${_LANG} bindings." ${_DEFVAL})
SET(BUILDSWIGVAL ${_DEFVAL})
IF(NOT PHYSFS_BUILD_SWIG)
SET(BUILDSWIGVAL FALSE)
ENDIF(NOT PHYSFS_BUILD_SWIG)
OPTION(${_VAR} "Build ${_LANG} bindings." ${BUILDSWIGVAL})
MARK_AS_ADVANCED(${_VAR})
ENDMACRO(ADD_SCRIPT_BINDING_OPTION)

Expand Down

0 comments on commit 2939b26

Please sign in to comment.