Saxum/extern/acgl/cmake/DefinesACGL.txt

56 lines
1.7 KiB
Plaintext
Raw Permalink Normal View History

2014-10-20 15:31:26 +00:00
# Define error check
IF(NOT DEFINED ACGL_ERROR_LEVEL)
MESSAGE(FATAL_ERROR "ACGL_ERROR_LEVEL is not defined!")
ELSE()
SET(ACGL_ERROR_LEVEL_${ACGL_ERROR_LEVEL} True)
SET(ACGL_DEFINES ${ACGL_DEFINES} -DACGL_ERROR_LEVEL_${ACGL_ERROR_LEVEL})
ENDIF()
# Define OpenGL Profile and Version:
IF(NOT DEFINED ACGL_OPENGL_SUPPORT)
MESSAGE(FATAL_ERROR "ACGL_OPENGL_SUPPORT is not defined!")
ELSE()
STRING(REPLACE "_" ";" ACGL_OPENGL_SUPPORT_SPLIT ${ACGL_OPENGL_SUPPORT})
LIST(GET ACGL_OPENGL_SUPPORT_SPLIT 0 ACGL_OPENGL_PROFILE)
LIST(GET ACGL_OPENGL_SUPPORT_SPLIT 1 ACGL_OPENGL_VERSION)
SET(ACGL_OPENGL_PROFILE_${ACGL_OPENGL_PROFILE} True)
SET(ACGL_OPENGL_VERSION_${ACGL_OPENGL_VERSION} True)
SET(ACGL_DEFINES ${ACGL_DEFINES} -DACGL_OPENGL_PROFILE_${ACGL_OPENGL_PROFILE})
SET(ACGL_DEFINES ${ACGL_DEFINES} -DACGL_OPENGL_VERSION_${ACGL_OPENGL_VERSION})
ENDIF()
# Set target platform
SET(ACGL_PLATFORM DESKTOP)
STRING(COMPARE EQUAL ${ACGL_OPENGL_PROFILE} ES EQ)
IF(EQ)
SET(FIND_GLEW FALSE)
SET(ACGL_PLATFORM MOBILE)
ELSE()
SET(FIND_GLEW TRUE)
LIST(FIND ACGL_OPENGL_SUPPORT_SPLIT ES ID)
IF(NOT ID EQUAL -1)
SET(ACGL_SIMULATE_ES True)
SET(ACGL_DEFINES ${ACGL_DEFINES} -DACGL_SIMULATE_ES)
ENDIF()
ENDIF()
SET(ACGL_PLATFORM_${ACGL_PLATFORM} True)
SET(ACGL_DEFINES ${ACGL_DEFINES} -DACGL_PLATFORM_${ACGL_PLATFORM})
# Use Qt
STRING(COMPARE EQUAL ${ACGL_COMPILE_WITH_QT} Yes EQ)
IF(EQ)
SET(ACGL_COMPILE_WITH_QT True)
SET(ACGL_DEFINES ${ACGL_DEFINES} -DACGL_COMPILE_WITH_QT)
SET(FIND_QT TRUE)
ELSE()
SET(ACGL_COMPILE_WITH_QT False)
SET(FIND_QT FALSE)
ENDIF()
#Compile the C runtime environment statically
IF(NOT DEFINED ACGL_STATIC_RUNTIME_ENV)
SET(ACGL_STATIC_RUNTIME_ENV False)
ENDIF()