John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 2.8) |
| 2 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 3 | set(SOURCES StandAlone.cpp) |
| 4 | set(REMAPPER_SOURCES spirv-remap.cpp) |
| 5 | |
| 6 | add_executable(glslangValidator ${SOURCES}) |
| 7 | add_executable(spirv-remap ${REMAPPER_SOURCES}) |
| 8 | |
| 9 | set(LIBRARIES |
| 10 | glslang |
| 11 | OGLCompiler |
| 12 | OSDependent |
| 13 | SPIRV) |
| 14 | |
| 15 | if(WIN32) |
| 16 | set(LIBRARIES ${LIBRARIES} psapi) |
| 17 | elseif(UNIX) |
Andrew Woloszyn | 8b64fa5 | 2015-08-17 11:39:38 -0400 | [diff] [blame] | 18 | if(NOT ANDROID) |
| 19 | set(LIBRARIES ${LIBRARIES} pthread) |
| 20 | endif() |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 21 | endif(WIN32) |
| 22 | |
| 23 | target_link_libraries(glslangValidator ${LIBRARIES}) |
| 24 | target_link_libraries(spirv-remap ${LIBRARIES}) |
| 25 | |
| 26 | if(WIN32) |
| 27 | source_group("Source" FILES ${SOURCES}) |
| 28 | endif(WIN32) |
| 29 | |
| 30 | install(TARGETS glslangValidator |
| 31 | RUNTIME DESTINATION bin) |
| 32 | |
| 33 | install(TARGETS spirv-remap |
| 34 | RUNTIME DESTINATION bin) |