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