Commit b6d7c160 authored by Lars Krecklau's avatar Lars Krecklau
Browse files

*Adapt cmake changes

parent 46df4583
......@@ -55,52 +55,15 @@ INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/include")
# Defines
################################################################################
# Define error check
ADD_DEFINITIONS(-DACGL_ERROR_LEVEL_${ACGL_ERROR_LEVEL})
# Define OpenGL Profile and Version:
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)
ADD_DEFINITIONS(-DACGL_OPENGL_SUPPORT_${ACGL_OPENGL_SUPPORT})
ADD_DEFINITIONS(-DACGL_OPENGL_PROFILE_${ACGL_OPENGL_PROFILE})
ADD_DEFINITIONS(-DACGL_OPENGL_VERSION_${ACGL_OPENGL_VERSION})
# Set target platform
SET(ACGL_POSTFIX_ES "")
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)
ADD_DEFINITIONS(-DACGL_SIMULATE_ES)
SET(ACGL_POSTFIX_ES "_ES")
ENDIF()
ENDIF()
ADD_DEFINITIONS(-DACGL_PLATFORM_${ACGL_PLATFORM})
# Use Qt
SET(ACGL_POSTFIX_QT "")
STRING(COMPARE EQUAL ${ACGL_COMPILE_WITH_QT} Yes EQ)
IF(EQ)
SET(ACGL_POSTFIX_QT "_QT")
SET(FIND_QT TRUE)
ELSE()
SET(FIND_QT FALSE)
ENDIF()
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/DefinesACGL.txt)
ADD_DEFINITIONS(${ACGL_DEFINES})
################################################################################
# External Libraries
################################################################################
# Qt
IF(FIND_QT)
IF(DEFINED ACGL_COMPILE_WITH_QT)
#MESSAGE("QT")
SET(QT_USE_QTOPENGL TRUE)
FIND_PACKAGE(Qt4 REQUIRED)
......@@ -113,9 +76,10 @@ FIND_PACKAGE(GLM REQUIRED)
INCLUDE_DIRECTORIES(${GLM_INCLUDE_DIR})
# GLEW
IF(FIND_GLEW)
IF(DEFINED ACGL_PLATFORM_DESKTOP)
#MESSAGE("GLEW")
FIND_PACKAGE(GLEW REQUIRED)
ADD_DEFINITIONS(${GLEW_DEFINES})
INCLUDE_DIRECTORIES(${GLEW_INCLUDE_DIR})
SET(LIBRARIES ${LIBRARIES} ${GLEW_LIBRARIES})
ENDIF()
......@@ -125,7 +89,6 @@ ENDIF()
################################################################################
# Define the Project, add all required sources and dependencies to it
SET(LIBRARY_NAME ACGL_${ACGL_ERROR_LEVEL}_${ACGL_OPENGL_PROFILE}${ACGL_OPENGL_VERSION}${ACGL_POSTFIX_ES}${ACGL_POSTFIX_QT}${COMPILE_POSTFIX})
ADD_LIBRARY(${LIBRARY_NAME} STATIC ${SOURCE_FILES} ${HEADER_FILES})
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${LIBRARIES})
ADD_LIBRARY(ACGL${COMPILE_POSTFIX} STATIC ${SOURCE_FILES} ${HEADER_FILES})
TARGET_LINK_LIBRARIES(ACGL${COMPILE_POSTFIX} ${LIBRARIES})
#MESSAGE(${LIBRARY_NAME})
cmake @ acc65f5d
Subproject commit 5e4d3c32f2554df32324ba286c9ada9c32fe3b0a
Subproject commit acc65f5dbfb4d834c23b6e18c2e1ee9d80bef747
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment