From 2e47b58b18bef6c1938b0f0ef86d35e3f6e2d6e1 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Sun, 14 Feb 2021 06:18:49 +0000 Subject: [PATCH] Minor updates to demos cmake configuration Ground work for cmake compilation of demos project on non Linux platform --- util/test/demos/CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/util/test/demos/CMakeLists.txt b/util/test/demos/CMakeLists.txt index 15312d3ac..5c0095a21 100644 --- a/util/test/demos/CMakeLists.txt +++ b/util/test/demos/CMakeLists.txt @@ -59,9 +59,7 @@ set(VULKAN_SRC set(OPENGL_SRC 3rdparty/glad/glad.c - 3rdparty/glad/glad_glx.c gl/gl_test.cpp - gl/gl_test_linux.cpp gl/gl_buffer_resizing.cpp gl/gl_buffer_spam.cpp gl/gl_buffer_truncation.cpp @@ -103,9 +101,7 @@ set(OPENGL_SRC set(SRC main.cpp test_common.cpp - texture_zoo.cpp - linux/linux_platform.cpp - linux/linux_window.cpp) + texture_zoo.cpp) project(demos) @@ -113,7 +109,15 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") endif() -add_executable(demos ${SRC} ${VULKAN_SRC} ${OPENGL_SRC}) +if(NOT APPLE AND UNIX) + list(APPEND OPENGL_SRC + 3rdparty/glad/glad_glx.c + gl/gl_test_linux.cpp) + list(APPEND SRC + linux/linux_platform.cpp + linux/linux_window.cpp) + add_executable(demos ${SRC} ${VULKAN_SRC} ${OPENGL_SRC}) +endif() install(TARGETS demos DESTINATION .)