[forge] 02/08: Consistent definition of USE_SYSTEM flags for glbinding, glm and freetype
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Jan 4 20:59:32 UTC 2017
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository forge.
commit b8e7216e694ee86983f6a8760b7fffa592aed4c0
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date: Wed Dec 28 17:06:02 2016 +0000
Consistent definition of USE_SYSTEM flags for glbinding, glm and freetype
---
CMakeLists.txt | 5 -----
src/backend/opengl/CMakeLists.txt | 25 ++++++++-----------------
2 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3ef45f..1c0c591 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,11 +11,6 @@ SET_PROPERTY(CACHE USE_WINDOW_TOOLKIT PROPERTY STRINGS "glfw3" "sdl2")
OPTION(BUILD_DOCUMENTATION "Build Documentation" OFF)
OPTION(BUILD_EXAMPLES "Build Examples" ON)
-OPTION(USE_LOCAL_GLM "Download and use local GLM" OFF)
-OPTION(USE_LOCAL_FREETYPE "Download and use local freetype" OFF)
-MARK_AS_ADVANCED(USE_LOCAL_GLM)
-MARK_AS_ADVANCED(USE_LOCAL_FREETYPE)
-
# Set a default build type if none was specified
IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
diff --git a/src/backend/opengl/CMakeLists.txt b/src/backend/opengl/CMakeLists.txt
index 1dd851d..fb570ba 100755
--- a/src/backend/opengl/CMakeLists.txt
+++ b/src/backend/opengl/CMakeLists.txt
@@ -1,9 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
-# Prior to GLM 0.9.7.0, the package is found by the FindGLM.cmake module.
-# This was removed with GLM 0.9.7.0, instead a glm-config.cmake configuration
-# file is provided. Therefore, both FIND_PACKAGE calls are necessary.
-FIND_PACKAGE(GLM QUIET)
-FIND_PACKAGE(glm QUIET)
OPTION(USE_SYSTEM_GLBINDING "Use system glbinding" OFF)
IF(USE_SYSTEM_GLBINDING)
@@ -17,22 +12,18 @@ ENDIF(USE_SYSTEM_GLBINDING)
INCLUDE(GLSLtoH)
-IF((NOT glm_FOUND AND NOT GLM_FOUND) OR (${USE_LOCAL_GLM}))
- SET(USE_LOCAL_GLM ON)
- MESSAGE(STATUS "Downloading GLM headers.")
- INCLUDE(build_glm)
+OPTION(USE_SYSTEM_GLM "Use the system GLM library" OFF)
+IF(USE_SYSTEM_GLM)
+ FIND_PACKAGE(glm REQUIRED)
ELSE()
- MESSAGE(STATUS "Using System GLM")
+ INCLUDE(build_glm)
ENDIF()
-FIND_PACKAGE(Freetype QUIET)
-
-IF(NOT FREETYPE_FOUND OR ${USE_LOCAL_FREETYPE})
- SET(USE_LOCAL_FREETYPE ON)
- MESSAGE(STATUS "Downloading and building Freetype libraries.")
- INCLUDE(build_freetype)
+OPTION(USE_SYSTEM_FREETYPE "Use the system Freetype library" OFF)
+IF(USE_SYSTEM_FREETYPE)
+ FIND_PACKAGE(Freetype REQUIRED)
ELSE()
- MESSAGE(STATUS "Using System FreeType2")
+ INCLUDE(build_freetype)
ENDIF()
IF(UNIX)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/forge.git
More information about the debian-science-commits
mailing list