2019-03-04 10:45:30 +00:00
|
|
|
cmake_minimum_required(VERSION 2.8.12)
|
|
|
|
|
2019-03-24 12:59:46 +00:00
|
|
|
make_release_only()
|
|
|
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ZD_FASTMATH_FLAG}" )
|
|
|
|
|
2019-03-04 10:45:30 +00:00
|
|
|
# Request C++11
|
|
|
|
if(${CMAKE_VERSION} VERSION_LESS 3.1)
|
|
|
|
# CMake versions before 3.1 do not understand CMAKE_CXX_STANDARD
|
|
|
|
# remove this block once CMake >=3.1 has fixated in the ecosystem
|
|
|
|
add_compile_options(-std=c++11)
|
|
|
|
else()
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
endif()
|
|
|
|
|
2019-02-20 20:21:57 +00:00
|
|
|
set(SOURCES InitializeDll.cpp InitializeDll.h)
|
|
|
|
|
|
|
|
add_library(OGLCompiler STATIC ${SOURCES})
|
|
|
|
set_property(TARGET OGLCompiler PROPERTY FOLDER glslang)
|
|
|
|
set_property(TARGET OGLCompiler PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
source_group("Source" FILES ${SOURCES})
|
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
if(ENABLE_GLSLANG_INSTALL)
|
|
|
|
install(TARGETS OGLCompiler
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
endif(ENABLE_GLSLANG_INSTALL)
|
2019-03-04 10:45:30 +00:00
|
|
|
|