CMake: confine WIN32 options
authorCampbell Barton <ideasman42@gmail.com>
Sun, 5 Mar 2017 17:05:00 +0000 (04:05 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 5 Mar 2017 17:05:00 +0000 (04:05 +1100)
CMakeLists.txt

index 1cc3e02e03a1d6a6770378bbf5aadd1f141b5bfd..1325ab7124b66db9676589a2e7eeb2aafa849e93 100644 (file)
@@ -519,18 +519,20 @@ endif()
 option(WITH_LEGACY_DEPSGRAPH "Build Blender with legacy dependency graph" ON)
 mark_as_advanced(WITH_LEGACY_DEPSGRAPH)
 
-# Use hardcoded paths or find_package to find externals
-option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
-mark_as_advanced(WITH_WINDOWS_FIND_MODULES)
+if(WIN32)
+       # Use hardcoded paths or find_package to find externals
+       option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
+       mark_as_advanced(WITH_WINDOWS_FIND_MODULES)
 
-option(WITH_WINDOWS_CODESIGN "Use signtool to sign the final binary." OFF)
-mark_as_advanced(WITH_WINDOWS_CODESIGN)
+       option(WITH_WINDOWS_CODESIGN "Use signtool to sign the final binary." OFF)
+       mark_as_advanced(WITH_WINDOWS_CODESIGN)
 
-set(WINDOWS_CODESIGN_PFX CACHE FILEPATH  "Path to pfx file to use for codesigning.")
-mark_as_advanced(WINDOWS_CODESIGN_PFX)
+       set(WINDOWS_CODESIGN_PFX CACHE FILEPATH  "Path to pfx file to use for codesigning.")
+       mark_as_advanced(WINDOWS_CODESIGN_PFX)
 
-set(WINDOWS_CODESIGN_PFX_PASSWORD CACHE STRING  "password for pfx file used for codesigning.")
-mark_as_advanced(WINDOWS_CODESIGN_PFX_PASSWORD)
+       set(WINDOWS_CODESIGN_PFX_PASSWORD CACHE STRING  "password for pfx file used for codesigning.")
+       mark_as_advanced(WINDOWS_CODESIGN_PFX_PASSWORD)
+endif()
 
 # avoid using again
 option_defaults_clear()