blob: b0b9fc4e43c9e43997f982a5a1d599e8c2d8f703 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 9b13be109bc66f4d4a1ad53ce5c92c7c495e41d7 Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Tue, 24 Jul 2018 17:40:52 +0300
4Subject: [PATCH] commit f63cbe944107b5cd8f150ceaaec43b26099d5688
5
Brad Bishop6e60e8b2018-02-01 10:27:11 -05006Author: Adam Jackson <ajax@redhat.com>
7Date: Tue Feb 16 10:05:25 2016 -0500
8
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08009demos: Don't build tri or cube
10
11There are more interesting demos, all we really want here is vulkaninfo.
12This helps because we don't need to pre-build glslang/llvm/lunarglass
13just to get the loader and layers.
Brad Bishop6e60e8b2018-02-01 10:27:11 -050014
15Upstream-Status: Inappropriate [configuration]
Brad Bishop6e60e8b2018-02-01 10:27:11 -050016
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
18Signed-off-by: Maxin B. John <maxin.john@intel.com>
19---
20 demos/CMakeLists.txt | 88 ----------------------------------------------------
21 1 file changed, 88 deletions(-)
22
23diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt
24index 4f32679..26e4cdf 100644
25--- a/demos/CMakeLists.txt
26+++ b/demos/CMakeLists.txt
27@@ -93,42 +93,6 @@ elseif(UNIX)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050028 else()
29 endif()
30
31-if(WIN32)
32- # For Windows, since 32-bit and 64-bit items can co-exist, we build each in its own build directory.
33- # 32-bit target data goes in build32, and 64-bit target data goes into build. So, include/link the
34- # appropriate data at build time.
35- if (CMAKE_CL_64)
36- set (BUILDTGT_DIR build)
37- else ()
38- set (BUILDTGT_DIR build32)
39- endif()
40-
41- # Use static MSVCRT libraries
42- foreach(configuration in CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
43- CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO)
44- if(${configuration} MATCHES "/MD")
45- string(REGEX REPLACE "/MD" "/MT" ${configuration} "${${configuration}}")
46- endif()
47- endforeach()
48-
Brad Bishop6e60e8b2018-02-01 10:27:11 -050049- file(COPY cube.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
50- file(COPY vulkaninfo.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050051-endif()
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080052-
53-add_custom_command(
54- COMMENT "Compiling cube demo vertex shader"
55- OUTPUT cube.vert.inc
56- COMMAND ${GLSLANG_VALIDATOR} -V -x -o ${CMAKE_CURRENT_BINARY_DIR}/cube.vert.inc ${PROJECT_SOURCE_DIR}/demos/cube.vert
57- MAIN_DEPENDENCY ${PROJECT_SOURCE_DIR}/demos/cube.vert
58- DEPENDS ${PROJECT_SOURCE_DIR}/demos/cube.vert ${GLSLANG_VALIDATOR}
59-)
60-add_custom_command(
61- COMMENT "Compiling cube demo fragment shader"
62- OUTPUT cube.frag.inc
63- COMMAND ${GLSLANG_VALIDATOR} -V -x -o ${CMAKE_CURRENT_BINARY_DIR}/cube.frag.inc ${PROJECT_SOURCE_DIR}/demos/cube.frag
64- MAIN_DEPENDENCY ${PROJECT_SOURCE_DIR}/demos/cube.frag
65- DEPENDS ${PROJECT_SOURCE_DIR}/demos/cube.frag ${GLSLANG_VALIDATOR}
66-)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050067
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080068 include_directories(${CMAKE_CURRENT_BINARY_DIR})
Brad Bishop6e60e8b2018-02-01 10:27:11 -050069
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080070@@ -172,55 +136,3 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
71 install(TARGETS ${API_LOWERCASE}info DESTINATION ${CMAKE_INSTALL_BINDIR})
72 endif()
73 endif()
74-
75-######################################################################################
76-# cube
77-
78-if(APPLE)
79- include(macOS/cube/cube.cmake)
80-elseif(NOT WIN32)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050081- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080082- add_executable(cube cube.c ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050083- target_link_libraries(cube ${LIBRARIES})
84- endif()
85-else()
86- if (CMAKE_CL_64)
87- set (LIB_DIR "Win64")
88- else()
89- set (LIB_DIR "Win32")
90- endif()
91-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080092- add_executable(cube WIN32 cube.c ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050093- target_link_libraries(cube ${LIBRARIES})
94-endif()
95-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080096-######################################################################################
97-# cubepp
98-
99-if(APPLE)
100- include(macOS/cubepp/cubepp.cmake)
101-elseif(NOT WIN32)
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500102- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800103- add_executable(cubepp cube.cpp ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc)
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500104- target_link_libraries(cubepp ${LIBRARIES})
105- endif()
106-else()
107- if (CMAKE_CL_64)
108- set (LIB_DIR "Win64")
109- else()
110- set (LIB_DIR "Win32")
111- endif()
112-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800113- add_executable(cubepp WIN32 cube.cpp ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc)
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500114- target_link_libraries(cubepp ${LIBRARIES})
115-endif()
116-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800117-######################################################################################
118-# smoke
119-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500120-if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}))
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800121- if ((DEMOS_WSI_SELECTION STREQUAL "XCB") OR (DEMOS_WSI_SELECTION STREQUAL "WAYLAND") OR WIN32 OR
122- (CMAKE_SYSTEM_NAME STREQUAL "Android") OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500123- add_subdirectory(smoke)
124- endif()
125-endif()
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800126--
1272.4.0
128