mvadkert / rpms / vulkan

Forked from rpms/vulkan 6 years ago
Clone

Blame 0008-demos-Don-t-build-tri-or-cube.patch

cba7e8b
--- a/demos/CMakeLists.txt
cba7e8b
+++ b/demos/CMakeLists.txt
62d9cb1
@@ -63,46 +63,6 @@
62d9cb1
 else()
62d9cb1
 endif()
62d9cb1
 
00758ed
-if(WIN32)
00758ed
-    # For Windows, since 32-bit and 64-bit items can co-exist, we build each in its own build directory.
00758ed
-    # 32-bit target data goes in build32, and 64-bit target data goes into build.  So, include/link the
00758ed
-    # appropriate data at build time.
00758ed
-    if (CMAKE_CL_64)
00758ed
-        set (BUILDTGT_DIR build)
00758ed
-    else ()
00758ed
-        set (BUILDTGT_DIR build32)
00758ed
-    endif()
00758ed
-
00758ed
-    # Use static MSVCRT libraries
00758ed
-    foreach(configuration in CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
00758ed
-                             CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO)
00758ed
-        if(${configuration} MATCHES "/MD")
00758ed
-            string(REGEX REPLACE "/MD" "/MT" ${configuration} "${${configuration}}")
00758ed
-        endif()
00758ed
-    endforeach()
00758ed
-
00758ed
-    add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv
00758ed
-       COMMAND ${GLSLANG_VALIDATOR} -s -V -o ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert
00758ed
-       DEPENDS cube.vert ${GLSLANG_VALIDATOR}
00758ed
-       )
00758ed
-    add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv
00758ed
-       COMMAND ${GLSLANG_VALIDATOR} -s -V -o ${CMAKE_BINARY_DIR}/demos/cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag
00758ed
-       DEPENDS cube.frag ${GLSLANG_VALIDATOR}
00758ed
-       )
00758ed
-   file(COPY cube.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
00758ed
-   file(COPY vulkaninfo.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
00758ed
-else()
00758ed
-    if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
00758ed
-        add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv
00758ed
-            COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert
00758ed
-            DEPENDS cube.vert ${GLSLANG_VALIDATOR}
00758ed
-            )
00758ed
-        add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv
00758ed
-            COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag
00758ed
-            DEPENDS cube.frag ${GLSLANG_VALIDATOR}
00758ed
-            )
00758ed
-    endif()         
62d9cb1
-endif()
cba7e8b
 
9666316
 if(WIN32)
62d9cb1
     include_directories (
62d9cb1
@@ -116,38 +76,6 @@
e068e7c
 add_executable(${API_LOWERCASE}info vulkaninfo.c)
e068e7c
 target_link_libraries(${API_LOWERCASE}info ${LIBRARIES})
00758ed
 
00758ed
-if(NOT WIN32)
00758ed
-    if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
00758ed
-        add_executable(cube cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
00758ed
-        target_link_libraries(cube ${LIBRARIES})
00758ed
-    endif()
00758ed
-else()
00758ed
-    if (CMAKE_CL_64)
00758ed
-        set (LIB_DIR "Win64")
00758ed
-    else()
00758ed
-        set (LIB_DIR "Win32")
00758ed
-    endif()
00758ed
-
00758ed
-    add_executable(cube WIN32 cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
00758ed
-    target_link_libraries(cube ${LIBRARIES})
00758ed
-endif()
00758ed
-
cba7e8b
-if(NOT WIN32)
9b5a331
-    if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
9b5a331
-        add_executable(cubepp cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
9b5a331
-        target_link_libraries(cubepp ${LIBRARIES})
9b5a331
-    endif()
cba7e8b
-else()
cba7e8b
-    if (CMAKE_CL_64)
cba7e8b
-        set (LIB_DIR "Win64")
cba7e8b
-    else()
cba7e8b
-        set (LIB_DIR "Win32")
cba7e8b
-    endif()
cba7e8b
-
9b5a331
-    add_executable(cubepp WIN32 cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
9b5a331
-    target_link_libraries(cubepp ${LIBRARIES})
cba7e8b
-endif()
cba7e8b
-
62d9cb1
 if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}))
62d9cb1
     if  ((DEMOS_WSI_SELECTION STREQUAL "XCB") OR (DEMOS_WSI_SELECTION STREQUAL "WAYLAND") OR WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Android"))
62d9cb1
         add_subdirectory(smoke)
9b5a331