From 2f4ea475661de2884992bf686f3f3318a2f227ec Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 15 Mar 2016 23:50:44 +1100 Subject: [PATCH] CMake: only show py module install options when used --- CMakeLists.txt | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b6e07de36f..4010ee6416f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -362,19 +362,23 @@ if(UNIX AND NOT APPLE) mark_as_advanced(WITH_BOOST_ICU) endif() endif() + option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON) -option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON) -set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module") -mark_as_advanced(PYTHON_NUMPY_PATH) +if(WITH_PYTHON_INSTALL) + option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON) + set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module") + mark_as_advanced(PYTHON_NUMPY_PATH) + + if(UNIX AND NOT APPLE) + option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON) + set(PYTHON_REQUESTS_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'requests' module") + mark_as_advanced(PYTHON_REQUESTS_PATH) + endif() +endif() + option(WITH_CPU_SSE "Enable SIMD instruction if they're detected on the host machine" ON) mark_as_advanced(WITH_CPU_SSE) -if(UNIX AND NOT APPLE) - option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON) - set(PYTHON_REQUESTS_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'requests' module") - mark_as_advanced(PYTHON_REQUESTS_PATH) -endif() - # Cycles option(WITH_CYCLES "Enable Cycles Render Engine" ON) option(WITH_CYCLES_STANDALONE "Build Cycles standalone application" OFF)