External_glew.cmake 1.47 KB
Newer Older
1
#
Julien Michel's avatar
Julien Michel committed
2
# Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#
# This file is part of Orfeo Toolbox
#
#     https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

21
INCLUDE_ONCE_MACRO(GLEW)
22

23 24 25 26
SETUP_SUPERBUILD(GLEW)

ExternalProject_Add(GLEW
  PREFIX GLEW
27
  URL "https://downloads.sourceforge.net/project/glew/glew/1.13.0/glew-1.13.0.tgz"
28 29 30 31 32
  URL_MD5 7cbada3166d2aadfc4169c4283701066
  SOURCE_DIR ${GLEW_SB_SRC}
  BINARY_DIR ${GLEW_SB_BUILD_DIR}
  DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
  INSTALL_DIR ${SB_INSTALL_PREFIX}
33
  CONFIGURE_COMMAND ${SB_CMAKE_COMMAND} ${SB_CMAKE_ARGS} ${SB_CMAKE_CACHE_ARGS} -DBUILD_UTILS:BOOL=OFF ${GLEW_SB_SRC}/build/cmake/
34
  LOG_DOWNLOAD 1
35 36 37
  LOG_CONFIGURE 1
  LOG_BUILD 1
  LOG_INSTALL 1
38
  )
39

40 41
SUPERBUILD_PATCH_SOURCE(GLEW)

42 43
set(_SB_GLEW_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
44
  set(_SB_GLEW_LIBRARY ${SB_INSTALL_PREFIX}/lib/glew32.lib)
45 46
elseif(UNIX)
  set(_SB_GLEW_LIBRARY ${SB_INSTALL_PREFIX}/lib/libGLEW${CMAKE_SHARED_LIBRARY_SUFFIX})
47
endif()