aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Hayes <jeremy@lunarg.com>2016-10-09 13:57:43 -0600
committerJeremy Hayes <jeremy@lunarg.com>2016-10-09 14:33:56 -0600
commit4fa507a79c87b9e4b89ec66e23b230e981bb4326 (patch)
tree9d6a28e65d057e8597da8972daeade47bc5b1d48
parente4080610fd9ce529a6ebbaa5f6e286245c1098cb (diff)
downloadusermoji-4fa507a79c87b9e4b89ec66e23b230e981bb4326.tar.xz
demos: fix cubepp cross-platform build
Change-Id: I823154dc0c61e7358d88fe6afc4f5808b640804d
-rw-r--r--demos/CMakeLists.txt17
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)