diff --git a/CMake/FindGLEW.cmake b/CMake/FindGLEW.cmake index 8de4220c0495feb032563df75142777c70c716e3..c54e3656c7f7844cb52d8cfa1b15258c515fa9b3 100644 --- a/CMake/FindGLEW.cmake +++ b/CMake/FindGLEW.cmake @@ -1,4 +1,30 @@ -# Courtesy of: https://raw.github.com/progschj/OpenGL-Examples/ +# File from https://github.com/progschj/OpenGL-Examples/ +# +# ---------------------------------------------------------------------------- +# Copyright (c) 2012-2013 Jakob Progsch +# Released under ZLib license: +# +# This software is provided 'as-is', without any express or implied warranty. +# In no event will the authors be held liable for any damages arising from the +# use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software in +# a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# +# 3. This notice may not be removed or altered from any source distribution. +# ---------------------------------------------------------------------------- +# +# NOTE: This file was removed from OpenGL-Examples project on 2013-11-01: +# https://github.com/progschj/OpenGL-Examples/commit/a100ce1ec6f5f6acf6ba3a3279cd3b3b91775b20 # # Try to find GLEW library and include path. # Once done this will define @@ -6,7 +32,7 @@ # GLEW_FOUND # GLEW_INCLUDE_PATH # GLEW_LIBRARY -# +# IF (WIN32) FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h @@ -52,6 +78,6 @@ IF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY) ENDIF () INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLEW +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLEW REQUIRED_VARS GLEW_LIBRARY GLEW_INCLUDE_DIR VERSION_VAR GLEW_VERSION_STRING) diff --git a/CMake/FindOpenThreads.cmake b/CMake/FindOpenThreads.cmake index 1c8c7a8e361a64d2a39b2ce3d3cd60f475c2e749..e57dff2ce667c6dceec96a49d55f011a0926877d 100644 --- a/CMake/FindOpenThreads.cmake +++ b/CMake/FindOpenThreads.cmake @@ -25,6 +25,7 @@ #============================================================================= # Copyright 2007-2009 Kitware, Inc. +# Copyright 2009-2017 Centre National d'Etudes Spatiales (CNES) # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. @@ -33,14 +34,6 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= -# Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. -# See OTBCopyright.txt for details. -# -# -# This software is distributed WITHOUT ANY WARRANTY; without even -# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the above copyright notices for more information. -#============================================================================= # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) @@ -90,7 +83,7 @@ if(EXISTS "${OPENTHREADS_INCLUDE_DIR}/OpenThreads/Version") string(REGEX REPLACE ".*# *define +OPENTHREADS_MAJOR_VERSION +([0-9]+).*" "\\1" OPENTHREADS_VERSION_MAJOR "${_openthreads_version_CONTENTS}") string(REGEX REPLACE ".*# *define +OPENTHREADS_MINOR_VERSION +([0-9]+).*" "\\1" OPENTHREADS_VERSION_MINOR "${_openthreads_version_CONTENTS}") string(REGEX REPLACE ".*# *define +OPENTHREADS_PATCH_VERSION +([0-9]+).*" "\\1" OPENTHREADS_VERSION_PATCH "${_openthreads_version_CONTENTS}") - + set(OPENTHREADS_VERSION "${OPENTHREADS_VERSION_MAJOR}.${OPENTHREADS_VERSION_MINOR}.${OPENTHREADS_VERSION_PATCH}") math(EXPR OPENTHREADS_VERSION_NUMBER "((${OPENTHREADS_VERSION_MAJOR})*100+${OPENTHREADS_VERSION_MINOR})*100+${OPENTHREADS_VERSION_PATCH}")