External_openthreads.cmake 1.66 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(OPENTHREADS)
22

23
SETUP_SUPERBUILD(OPENTHREADS)
Rashad Kanavath's avatar
Rashad Kanavath committed
24

25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
ExternalProject_Add(OPENTHREADS
  PREFIX OPENTHREADS
  URL "http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-3.4.0/source/OpenSceneGraph-3.4.0.zip"
  URL_MD5 a5e762c64373a46932e444f6f7332496
  SOURCE_DIR ${OPENTHREADS_SB_SRC}
  BINARY_DIR ${OPENTHREADS_SB_BUILD_DIR}
  INSTALL_DIR ${SB_INSTALL_PREFIX}
  DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
  CMAKE_CACHE_ARGS
  ${SB_CMAKE_CACHE_ARGS}
  CMAKE_COMMAND ${SB_CMAKE_COMMAND}
  DEPENDS ${OPENTHREADS_DEPENDENCIES}
  PATCH_COMMAND ${CMAKE_COMMAND} -E copy
  ${CMAKE_SOURCE_DIR}/patches/OPENTHREADS/CMakeLists.txt
  ${OPENTHREADS_SB_SRC}
40
  LOG_DOWNLOAD 1
41 42 43
  LOG_CONFIGURE 1
  LOG_BUILD 1
  LOG_INSTALL 1
44
  )
Rashad Kanavath's avatar
Rashad Kanavath committed
45

Rashad Kanavath's avatar
Rashad Kanavath committed
46 47 48 49 50 51
set(_SB_OPENTHREADS_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
  set(_SB_OPENTHREADS_LIBRARY ${SB_INSTALL_PREFIX}/lib/OpenThreads.lib)
elseif(UNIX)
  set(_SB_OPENTHREADS_LIBRARY ${SB_INSTALL_PREFIX}/lib/libOpenThreads${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()