aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2015-04-11 13:06:46 +0800
committerChia-I Wu <olv@lunarg.com>2015-04-11 13:12:14 +0800
commitdfd7c0d00732d1a5f43616cb9afb993d7948d0b3 (patch)
treeb42fa5e1c091c56d39623ca09dc43d29ebb6afc8
parent7934569b352ae1089828bde4f1dcd9bf7edda631 (diff)
downloadusermoji-dfd7c0d00732d1a5f43616cb9afb993d7948d0b3.tar.xz
demos: set EXTERNAL_SPV from CMakeLists.txt
Do not abuse XCB_NVIDIA.
-rw-r--r--demos/CMakeLists.txt2
-rw-r--r--demos/cube.c8
2 files changed, 2 insertions, 8 deletions
diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt
index 06279099..4e19030a 100644
--- a/demos/CMakeLists.txt
+++ b/demos/CMakeLists.txt
@@ -53,6 +53,8 @@ if(WIN32)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXCB_NVIDIA -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXCB_NVIDIA -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES")
set (LIBRARIES ${LIBRARIES} xcb_nvidia)
+else()
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DEXTERNAL_SPV")
endif()
add_executable(xglinfo xglinfo.c)
diff --git a/demos/cube.c b/demos/cube.c
index bd272e68..fcec0e04 100644
--- a/demos/cube.c
+++ b/demos/cube.c
@@ -19,14 +19,6 @@
#define DEMO_TEXTURE_COUNT 1
/*
- * When not defined, code will use built-in GLSL compiler
- * which may not be supported on all drivers
- */
-#if !defined(XCB_NVIDIA)
-#define EXTERNAL_SPV
-#endif
-
-/*
* structure to track all objects related to a texture.
*/
struct texture_objects {