CMakeLists.txt
changeset 1159 06fa9794e5c6
parent 1158 4b1bc199dc1f
child 1171 e4ca84e1d289
equal deleted inserted replaced
1158:4b1bc199dc1f 1159:06fa9794e5c6
   356 # Scripting language bindings...
   356 # Scripting language bindings...
   357 
   357 
   358 #CMake's SWIG support is basically useless.
   358 #CMake's SWIG support is basically useless.
   359 #FIND_PACKAGE(SWIG)
   359 #FIND_PACKAGE(SWIG)
   360 
   360 
       
   361 OPTION(PHYSFS_BUILD_SWIG "Build ${_LANG} bindings." TRUE)
       
   362 MARK_AS_ADVANCED(PHYSFS_BUILD_SWIG)
       
   363 
   361 FIND_PROGRAM(SWIG swig DOC "Path to swig command line app: http://swig.org/")
   364 FIND_PROGRAM(SWIG swig DOC "Path to swig command line app: http://swig.org/")
   362 IF(NOT SWIG)
   365 IF(NOT SWIG)
   363     MESSAGE(STATUS "SWIG not found. You won't be able to build scripting language bindings.")
   366     MESSAGE(STATUS "SWIG not found. You won't be able to build scripting language bindings.")
   364 ELSE(NOT SWIG)
   367 ELSE(NOT SWIG)
   365     MARK_AS_ADVANCED(SWIG)
   368     MARK_AS_ADVANCED(SWIG)
   409             MESSAGE(STATUS "Couldn't figure out ${_LANG} configuration. Skipping ${_LANG} bindings.")
   412             MESSAGE(STATUS "Couldn't figure out ${_LANG} configuration. Skipping ${_LANG} bindings.")
   410         ENDIF(PHYSFS_BUILD_${_UPPERLANG})
   413         ENDIF(PHYSFS_BUILD_${_UPPERLANG})
   411     ENDMACRO(CONFIGURE_SWIG_BINDING)
   414     ENDMACRO(CONFIGURE_SWIG_BINDING)
   412 
   415 
   413     MACRO(ADD_SCRIPT_BINDING_OPTION _VAR _LANG _DEFVAL)
   416     MACRO(ADD_SCRIPT_BINDING_OPTION _VAR _LANG _DEFVAL)
   414         OPTION(${_VAR} "Build ${_LANG} bindings." ${_DEFVAL})
   417         SET(BUILDSWIGVAL ${_DEFVAL})
       
   418         IF(NOT PHYSFS_BUILD_SWIG)
       
   419             SET(BUILDSWIGVAL FALSE)
       
   420         ENDIF(NOT PHYSFS_BUILD_SWIG)
       
   421         OPTION(${_VAR} "Build ${_LANG} bindings." ${BUILDSWIGVAL})
   415         MARK_AS_ADVANCED(${_VAR})
   422         MARK_AS_ADVANCED(${_VAR})
   416     ENDMACRO(ADD_SCRIPT_BINDING_OPTION)
   423     ENDMACRO(ADD_SCRIPT_BINDING_OPTION)
   417 
   424 
   418     ADD_SCRIPT_BINDING_OPTION(PHYSFS_BUILD_PERL "Perl" TRUE)
   425     ADD_SCRIPT_BINDING_OPTION(PHYSFS_BUILD_PERL "Perl" TRUE)
   419     ADD_SCRIPT_BINDING_OPTION(PHYSFS_BUILD_RUBY "Ruby" TRUE)
   426     ADD_SCRIPT_BINDING_OPTION(PHYSFS_BUILD_RUBY "Ruby" TRUE)