|
| 1 | +# For more information, please see: http://software.sci.utah.edu |
| 2 | +# |
| 3 | +# The MIT License |
| 4 | +# |
| 5 | +# Copyright (c) 2016 Scientific Computing and Imaging Institute, |
| 6 | +# University of Utah. |
| 7 | +# |
| 8 | +# |
| 9 | +# Permission is hereby granted, free of charge, to any person obtaining a |
| 10 | +# copy of this software and associated documentation files (the "Software"), |
| 11 | +# to deal in the Software without restriction, including without limitation |
| 12 | +# the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 13 | +# and/or sell copies of the Software, and to permit persons to whom the |
| 14 | +# Software is furnished to do so, subject to the following conditions: |
| 15 | +# |
| 16 | +# The above copyright notice and this permission notice shall be included |
| 17 | +# in all copies or substantial portions of the Software. |
| 18 | +# |
| 19 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 20 | +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 21 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 22 | +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 23 | +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 24 | +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 25 | +# DEALINGS IN THE SOFTWARE. |
| 26 | + |
| 27 | +SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base}) |
| 28 | +SET(glew_GIT_TAG "origin/master") |
| 29 | + |
| 30 | +IF(TRAVIS_BUILD) |
| 31 | + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w") |
| 32 | + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w") |
| 33 | +ENDIF() |
| 34 | + |
| 35 | +# If CMake ever allows overriding the checkout command or adding flags, |
| 36 | +# git checkout -q will silence message about detached head (harmless). |
| 37 | +ExternalProject_Add(Glew_external |
| 38 | + GIT_REPOSITORY "https://github.com/CIBC-Internal/glew.git" |
| 39 | + GIT_TAG ${glew_GIT_TAG} |
| 40 | + PATCH_COMMAND "" |
| 41 | + INSTALL_DIR "" |
| 42 | + INSTALL_COMMAND "" |
| 43 | + CMAKE_CACHE_ARGS |
| 44 | + -DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE} |
| 45 | + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} |
| 46 | + -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON |
| 47 | + -DCMAKE_CXX_FLAGS:STATIC=${CMAKE_CXX_FLAGS} |
| 48 | + -DCMAKE_C_FLAGS:STATIC=${CMAKE_C_FLAGS} |
| 49 | +) |
| 50 | + |
| 51 | +ExternalProject_Get_Property(Glew_external BINARY_DIR) |
| 52 | +SET(Glew_DIR ${BINARY_DIR} CACHE PATH "") |
| 53 | + |
| 54 | +MESSAGE(STATUS "Glew_DIR: ${Glew_DIR}") |
0 commit comments