diff options
| -rw-r--r-- | demos/CMakeLists.txt | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt index 837d32d2..c19c0448 100644 --- a/demos/CMakeLists.txt +++ b/demos/CMakeLists.txt @@ -111,12 +111,21 @@ else() target_link_libraries(cube ${LIBRARIES}) endif() -if(UNIX) - add_executable(cubepp cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv) -elseif(WIN32) +if(NOT WIN32) + if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}) + add_executable(cubepp cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv) + target_link_libraries(cubepp ${LIBRARIES}) + endif() +else() + if (CMAKE_CL_64) + set (LIB_DIR "Win64") + else() + set (LIB_DIR "Win32") + endif() + add_executable(cubepp WIN32 cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv) + target_link_libraries(cubepp ${LIBRARIES}) endif() -target_link_libraries(cubepp ${LIBRARIES}) if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}) add_subdirectory(smoke) |
