Don't build PowerVR samples by default

Previously the PowerVR samples would be built if the submodule is
present. Since it has additional build dependencies which are not
documented as SwiftShader prerequisites this can cause failures such as:

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find X11 (missing: X11_X11_LIB)
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.22/Modules/FindX11.cmake:457 (find_package_handle_standard_args)
  third_party/PowerVR_Examples/framework/PVRShell/CMakeLists.txt:92 (find_package)

This change works around the issue by defaulting to not building the
PowerVR samples. The SWIFTSHADER_BUILD_PVR CMake option now behaves
like the other optional ones; it downloads the submodule if not already
present. The SWIFTSHADER_GET_PVR option to explicitly trigger the
download through the CMake configuration has been removed.

The old behavior was particularly convenient for developing in Visual
Studio, but we rarely use the PowerVR samples now.

Bug: b/141361933
Change-Id: I8fb6afa28743d7ce010afdd1aabf3bace8b471ea
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/62768
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f814f6..1082853 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -148,14 +148,13 @@
 option_if_not_defined(SWIFTSHADER_BUILD_WSI_WAYLAND "Build the Wayland WSI support" FALSE)
 option_if_not_defined(SWIFTSHADER_BUILD_WSI_DIRECTFB "Build the DirectFB WSI support" FALSE)
 option_if_not_defined(SWIFTSHADER_BUILD_WSI_D2D "Build the Direct-to-Display WSI support" FALSE)
-option_if_not_defined(SWIFTSHADER_BUILD_PVR "Build the PowerVR examples" TRUE)
-option_if_not_defined(SWIFTSHADER_GET_PVR "Check out the PowerVR submodule" FALSE)
-
-option_if_not_defined(SWIFTSHADER_USE_GROUP_SOURCES "Group the source files in a folder tree for Visual Studio" TRUE)
+option_if_not_defined(SWIFTSHADER_BUILD_PVR "Build the PowerVR examples" FALSE)
 
 option_if_not_defined(SWIFTSHADER_BUILD_TESTS "Build unit tests" TRUE)
 option_if_not_defined(SWIFTSHADER_BUILD_BENCHMARKS "Build benchmarks" FALSE)
 
+option_if_not_defined(SWIFTSHADER_USE_GROUP_SOURCES "Group the source files in a folder tree for Visual Studio" TRUE)
+
 option_if_not_defined(SWIFTSHADER_MSAN "Build with memory sanitizer" FALSE)
 option_if_not_defined(SWIFTSHADER_ASAN "Build with address sanitizer" FALSE)
 option_if_not_defined(SWIFTSHADER_TSAN "Build with thread sanitizer" FALSE)
@@ -255,12 +254,8 @@
     InitSubmodule(libbacktrace ${THIRD_PARTY_DIR}/libbacktrace/src)
 endif()
 
-if(SWIFTSHADER_GET_PVR)
+if(SWIFTSHADER_BUILD_PVR)
     InitSubmodule(PVRCore ${THIRD_PARTY_DIR}/PowerVR_Examples)
-    set(SWIFTSHADER_GET_PVR FALSE CACHE BOOL "Check out the PowerVR submodule" FORCE)
-endif()
-if(EXISTS ${THIRD_PARTY_DIR}/PowerVR_Examples/.git)
-    set(HAVE_PVR_SUBMODULE TRUE)
 endif()
 
 if(SWIFTSHADER_BUILD_CPPDAP)
@@ -813,12 +808,12 @@
 ###########################################################
 
 # TODO(b/161976310): Add support for building PowerVR on MacOS
-if(APPLE AND HAVE_PVR_SUBMODULE AND SWIFTSHADER_BUILD_PVR)
+if(APPLE AND SWIFTSHADER_BUILD_PVR)
     message(WARNING "Building PowerVR examples for SwiftShader is not yet supported on Apple platforms.")
     set(SWIFTSHADER_BUILD_PVR FALSE)
 endif()
 
-if(HAVE_PVR_SUBMODULE AND SWIFTSHADER_BUILD_PVR)
+if(SWIFTSHADER_BUILD_PVR)
     if(UNIX AND NOT APPLE)
         set(PVR_WINDOW_SYSTEM XCB)