From 14e4f4f54c76ba23d1624746042902724ab2b7d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gero=20M=C3=BCller?= Date: Fri, 14 Jan 2011 22:02:36 +0100 Subject: [PATCH] fixed OpenGL --- CMakeLists.txt | 7 +++---- src/CMakeLists.txt | 10 +++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6534579..1821f3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,11 @@ cmake_minimum_required (VERSION 2.6) project (GREMLIN C CXX) -INCLUDE (CheckIncludeFiles) -CHECK_INCLUDE_FILES ("GL/gl.h" ENABLE_VIDEO) +find_package(OpenGL) -if (ENABLE_VIDEO) +if (OPENGL_FOUND) add_subdirectory (libs/glfw) add_subdirectory (libs/spark) -endif(ENABLE_VIDEO) +endif(OPENGL_FOUND) add_subdirectory (libs/enet) add_subdirectory (src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3067ea9..cfe1d2c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,13 +1,13 @@ -if (ENABLE_VIDEO) +if (OPENGL_FOUND) # find external software - find_package(OpenGL) + # set includes include_directories (${GREMLIN_SOURCE_DIR}/libs/glfw/include) include_directories (${GREMLIN_SOURCE_DIR}/libs/spark/include) SET(VIDEO_SOURCES Explosion oglfont Client) -endif(ENABLE_VIDEO) +endif(OPENGL_FOUND) include_directories (${GREMLIN_SOURCE_DIR}/libs/enet/include) include_directories (${GREMLIN_SOURCE_DIR}/src) @@ -55,7 +55,7 @@ target_link_libraries(gremlin_dedicated enet ${PLATFORM_LIBRARIES} ) -if (ENABLE_VIDEO) +if (OPENGL_FOUND) # set dependencies add_dependencies( gremlin glfw spark @@ -72,4 +72,4 @@ if (ENABLE_VIDEO) target_link_libraries(gremlin glfw spark ) -endif(ENABLE_VIDEO) +endif(OPENGL_FOUND)