1 cmake_minimum_required(VERSION 2.8.12)
2 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
6 set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "prefix")
11 set(CMAKE_DEBUG_POSTFIX "d")
12 include(ChooseMSVCCRT.cmake)
13 add_definitions(-DGLSLANG_OSINCLUDE_WIN32)
15 add_definitions(-fPIC)
16 add_definitions(-DGLSLANG_OSINCLUDE_UNIX)
18 message("unknown platform")
21 if(CMAKE_COMPILER_IS_GNUCXX)
22 add_definitions(-std=c++11)
23 elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
24 add_definitions(-std=c++11)
27 function(glslang_set_link_args TARGET)
28 # For MinGW compiles, statically link against the GCC and C++ runtimes.
29 # This avoids the need to ship those runtimes as DLLs.
31 if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
32 set_target_properties(${TARGET} PROPERTIES
33 LINK_FLAGS "-static -static-libgcc -static-libstdc++")
36 endfunction(glslang_set_link_args)
38 # We depend on these for later projects, so they should come first.
39 add_subdirectory(External)
41 add_subdirectory(glslang)
42 add_subdirectory(OGLCompilersDLL)
43 add_subdirectory(StandAlone)
44 add_subdirectory(SPIRV)
45 add_subdirectory(hlsl)
46 add_subdirectory(gtests)