From 830623800c8b36fc10321ce1418b229df94974eb Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Fri, 20 Jul 2012 22:09:58 +0100 Subject: [PATCH] Set BUILD_BINDINGS to OFF correctly When ENABLE_BINDINGS is true but SWIG or Python isn't found, correctly set BUILD_BINDINGS to OFF rather than leaving it blank. --- library/bindings/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/bindings/CMakeLists.txt b/library/bindings/CMakeLists.txt index 128a2347..20cefd92 100644 --- a/library/bindings/CMakeLists.txt +++ b/library/bindings/CMakeLists.txt @@ -20,6 +20,8 @@ if(ENABLE_BINDINGS) swig_add_module(PolyVoxCore python PolyVoxCore.i) swig_link_libraries(PolyVoxCore ${PYTHON_LIBRARIES} PolyVoxCore) #set_target_properties(${SWIG_MODULE_PolyVoxCore_REAL_NAME} PROPERTIES SUFFIX ".pyd") + else() + set(BUILD_BINDINGS OFF CACHE BOOL "Will the bindings be built" FORCE) endif() else() set(BUILD_BINDINGS OFF CACHE BOOL "Will the bindings be built" FORCE)