blob: 12655f78e557d185a346d0d67b4fab6064dc4e10 [file] [log] [blame]
John Kessenichd49d5242015-06-26 16:29:10 -06001cmake_minimum_required(VERSION 2.8)
2
Lei Zhang414eb602016-03-04 16:22:34 -05003enable_testing()
4
Chad Versace4cbf7482015-08-31 14:27:04 -07005set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "prefix")
John Kessenichd49d5242015-06-26 16:29:10 -06006
7project(glslang)
8
9if(WIN32)
John Kessenichd49d5242015-06-26 16:29:10 -060010 include(ChooseMSVCCRT.cmake)
baldurk876a0e32015-11-16 18:03:28 +010011 add_definitions(-DGLSLANG_OSINCLUDE_WIN32)
John Kessenichd49d5242015-06-26 16:29:10 -060012elseif(UNIX)
13 add_definitions(-fPIC)
baldurk876a0e32015-11-16 18:03:28 +010014 add_definitions(-DGLSLANG_OSINCLUDE_UNIX)
John Kessenichd49d5242015-06-26 16:29:10 -060015else(WIN32)
Eric Engestrom6a6d6dd2016-04-03 01:17:13 +010016 message("unknown platform")
John Kessenichd49d5242015-06-26 16:29:10 -060017endif(WIN32)
18
19if(CMAKE_COMPILER_IS_GNUCXX)
20 add_definitions(-std=c++11)
21elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
22 add_definitions(-std=c++11)
23endif()
24
Lei Zhang414eb602016-03-04 16:22:34 -050025# We depend on these for later projects, so they should come first.
26add_subdirectory(External)
27
John Kessenichd49d5242015-06-26 16:29:10 -060028add_subdirectory(glslang)
29add_subdirectory(OGLCompilersDLL)
30add_subdirectory(StandAlone)
31add_subdirectory(SPIRV)
Lei Zhang414eb602016-03-04 16:22:34 -050032
33add_subdirectory(gtests)