blob: bcf84a5a3e727b100c008a5ac1fc53ff2f10e2d9 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001commit f63cbe944107b5cd8f150ceaaec43b26099d5688
2Author: Adam Jackson <ajax@redhat.com>
3Date: Tue Feb 16 10:05:25 2016 -0500
4
5 demos: Don't build tri or cube
6
7 There are more interesting demos, all we really want here is vulkaninfo.
8 This helps because we don't need to pre-build glslang/llvm/lunarglass
9 just to get the loader and layers.
10
11Upstream-Status: Inappropriate [configuration]
12Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
13
Brad Bishop316dfdd2018-06-25 12:45:53 -040014Index: git/demos/CMakeLists.txt
15===================================================================
16--- git.orig/demos/CMakeLists.txt
17+++ git/demos/CMakeLists.txt
18@@ -63,46 +63,6 @@ elseif(UNIX)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019 else()
20 endif()
21
22-if(WIN32)
23- # For Windows, since 32-bit and 64-bit items can co-exist, we build each in its own build directory.
24- # 32-bit target data goes in build32, and 64-bit target data goes into build. So, include/link the
25- # appropriate data at build time.
26- if (CMAKE_CL_64)
27- set (BUILDTGT_DIR build)
28- else ()
29- set (BUILDTGT_DIR build32)
30- endif()
31-
32- # Use static MSVCRT libraries
33- foreach(configuration in CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
34- CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO)
35- if(${configuration} MATCHES "/MD")
36- string(REGEX REPLACE "/MD" "/MT" ${configuration} "${${configuration}}")
37- endif()
38- endforeach()
39-
40- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv
41- COMMAND ${GLSLANG_VALIDATOR} -s -V -o ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert
42- DEPENDS cube.vert ${GLSLANG_VALIDATOR}
43- )
44- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv
45- COMMAND ${GLSLANG_VALIDATOR} -s -V -o ${CMAKE_BINARY_DIR}/demos/cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag
46- DEPENDS cube.frag ${GLSLANG_VALIDATOR}
47- )
48- file(COPY cube.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
49- file(COPY vulkaninfo.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
50-else()
51- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
52- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv
53- COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert
54- DEPENDS cube.vert ${GLSLANG_VALIDATOR}
55- )
56- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv
57- COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag
58- DEPENDS cube.frag ${GLSLANG_VALIDATOR}
59- )
60- endif()
61-endif()
62
63 if(WIN32)
64 include_directories (
Brad Bishop316dfdd2018-06-25 12:45:53 -040065@@ -116,43 +76,6 @@ endif()
Brad Bishop6e60e8b2018-02-01 10:27:11 -050066 add_executable(${API_LOWERCASE}info vulkaninfo.c)
67 target_link_libraries(${API_LOWERCASE}info ${LIBRARIES})
68
69-if(NOT WIN32)
70- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
71- add_executable(cube cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
72- target_link_libraries(cube ${LIBRARIES})
73- endif()
74-else()
75- if (CMAKE_CL_64)
76- set (LIB_DIR "Win64")
77- else()
78- set (LIB_DIR "Win32")
79- endif()
80-
81- add_executable(cube WIN32 cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
82- target_link_libraries(cube ${LIBRARIES})
83-endif()
84-
85-if(NOT WIN32)
86- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
87- add_executable(cubepp cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
88- target_link_libraries(cubepp ${LIBRARIES})
89- endif()
90-else()
91- if (CMAKE_CL_64)
92- set (LIB_DIR "Win64")
93- else()
94- set (LIB_DIR "Win32")
95- endif()
96-
97- add_executable(cubepp WIN32 cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
98- target_link_libraries(cubepp ${LIBRARIES})
99-endif()
100-
101-if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}))
102- if ((DEMOS_WSI_SELECTION STREQUAL "XCB") OR (DEMOS_WSI_SELECTION STREQUAL "WAYLAND") OR WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Android"))
103- add_subdirectory(smoke)
104- endif()
105-endif()
106
107 if(UNIX)
Brad Bishop316dfdd2018-06-25 12:45:53 -0400108 if(INSTALL_LVL_FILES)