John Kessenich | d49d524 | 2015-06-26 16:29:10 -0600 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 2.8) |
| 2 | |
Chad Versace | 4cbf748 | 2015-08-31 14:27:04 -0700 | [diff] [blame] | 3 | set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "prefix") |
John Kessenich | d49d524 | 2015-06-26 16:29:10 -0600 | [diff] [blame] | 4 | |
| 5 | project(glslang) |
| 6 | |
| 7 | if(WIN32) |
| 8 | set(CMAKE_GENERATOR_TOOLSET "v110" CACHE STRING "Platform Toolset" FORCE) |
| 9 | include(ChooseMSVCCRT.cmake) |
baldurk | 876a0e3 | 2015-11-16 18:03:28 +0100 | [diff] [blame^] | 10 | add_definitions(-DGLSLANG_OSINCLUDE_WIN32) |
John Kessenich | d49d524 | 2015-06-26 16:29:10 -0600 | [diff] [blame] | 11 | elseif(UNIX) |
| 12 | add_definitions(-fPIC) |
baldurk | 876a0e3 | 2015-11-16 18:03:28 +0100 | [diff] [blame^] | 13 | add_definitions(-DGLSLANG_OSINCLUDE_UNIX) |
John Kessenich | d49d524 | 2015-06-26 16:29:10 -0600 | [diff] [blame] | 14 | else(WIN32) |
| 15 | message("unkown platform") |
| 16 | endif(WIN32) |
| 17 | |
| 18 | if(CMAKE_COMPILER_IS_GNUCXX) |
| 19 | add_definitions(-std=c++11) |
| 20 | elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") |
| 21 | add_definitions(-std=c++11) |
| 22 | endif() |
| 23 | |
| 24 | add_subdirectory(glslang) |
| 25 | add_subdirectory(OGLCompilersDLL) |
| 26 | add_subdirectory(StandAlone) |
| 27 | add_subdirectory(SPIRV) |