PackageGlobals.cmake 3.71 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# 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
set(LOADER_REGEX_EOL "E")
22 23 24 25 26 27 28 29 30
set(DEST_BIN_DIR bin)
set(DEST_APP_DIR lib/otb/applications)

set(LIB_PREFIX lib)
set(DEST_LIB_DIR lib)
set(EXE_EXT "")
set(SCRIPT_EXT ".sh")
set(LIB_EXT ".so")
set(PYMODULE_EXT ".so")
31 32
set(STATIC_LIB_EXT ".a")

33 34 35 36 37 38 39
if(WIN32)
  set(LIB_PREFIX)
  set(DEST_LIB_DIR bin)
  set(EXE_EXT ".exe")
  set(LIB_EXT ".dll")
  set(SCRIPT_EXT ".bat")
  set(PYMODULE_EXT ".pyd")
40
  set(STATIC_LIB_EXT ".lib")
41 42 43 44
elseif(APPLE)
  set(LIB_EXT ".dylib")
endif()

45 46
set(WINDOWS_SYSTEM_DLLS
  advapi32.dll
47
  comdlg32.dll
48
  crypt32.dll
49 50
  dwmapi.dll
  d3d9.dll
51
  gdi32.dll
52
  glu32.dll
53 54
  imm32.dll
  kernel32.dll
55
  netapi32.dll
56
  normaliz.dll
57
  mpr.dll
58
  odbc32.dll
59 60 61
  ole32.dll
  oleaut32.dll
  opengl32.dll
62 63
  psapi.dll
  python...dll
64 65 66 67 68
  rpcrt4.dll
  secur32.dll
  shell32.dll
  shfolder.dll
  user32.dll
69 70 71
  userenv.dll
  uxtheme.dll
  version.dll
72 73 74 75 76
  winmm.dll
  winspool.drv
  wldap32.dll
  ws2_32.dll
  wsock32.dll
77 78 79 80
  )

set(LINUX_SYSTEM_DLLS
  libm.so
81
  libc.so.*
82
  libstdc*
83 84 85 86 87 88 89 90
  libgcc_s.so
  librt.so
  libdl.so
  libpthread.so
  libidn.so
  libgomp.so*
  ld-linux-x86-64.so*
  libX11.so*
91 92 93
  libXi.so*  #GLUT
  libXcursor.so* #GLFW
  libXinerama.so*  #GLFW
94 95 96 97 98 99 100 101 102 103 104 105 106
  libXext.so*
  libXau.so*
  libXdmcp.so*
  libXxf86vm.so*
  libdrm.so.2
  libGL.so*
  libGLU.so*
  libXrender.so*
  libSM.so*
  libICE.so*
  libXrandr.so*
  libpython*
  )
107 108 109 110 111
  # libexpat.so.*
  # libfontconfig.so*
  # libfreetype.so*
  # libwebp.so*
  # )
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142

# libgcc_s.*dylib and other *.framework are dragged by QT
set(APPLE_SYSTEM_DLLS
  libSystem.*dylib
  libiconv.*dylib
  libc\\+\\+.*dylib
  libstdc.*dylib
  libobjc.*dylib
  ApplicationServices.framework
  CoreFoundation.framework
  CoreServices.framework
  Security.framework
  Carbon.framework
  AppKit.framework
  Foundation.framework
  Python.framework
  AGL.framework
  OpenGL.framework
  libgcc_s.*dylib
  )

if(WIN32)
  set(SYSTEM_DLLS "${WINDOWS_SYSTEM_DLLS}")
else() #case for unixes
  if(APPLE)
    set(SYSTEM_DLLS "${APPLE_SYSTEM_DLLS}")
  else()
    set(SYSTEM_DLLS "${LINUX_SYSTEM_DLLS}")
  endif()
endif(WIN32)

143 144 145 146 147 148 149 150 151
# Take gtk libs from system. we should fix this to take from custom
# build location
set(PKG_GTK_SEARCHDIRS
  /usr/lib64
  /lib64
  /lib/x86_64-linux-gnu/
  /usr/lib/x86_64-linux-gnu/
  )

152 153 154 155 156 157 158 159 160
#superbuild cannot manage build of gtk2+ just for qt gtkstyle.
# -gtkstyle option is deactivated by default in build of QT4
# So the list of requirements on building OTB with superbuild stays same.
#For our user base, we need monteverdi with a nice look and feel
# rather than simply X11 based windows. Hence we need -gtkstyle
# This forces us to have system gtk+ installed on the system.
# OTB package manager 'this script' will pick them up and put
# into the binary package. Below cmake variable controls the list of
#libraries coming from /usr/lib a.k.a system.
161 162

set(GTK_LIB_LIST_1
163 164 165 166
  libgthread-2.0.so.0
  libglib-2.0.so.0
  libgobject-2.0.so.0
  libXrender.so.1
167
  libpcre.so.3
168
  libffi.so.6
169
  )
170 171 172 173 174
# set(GTK_LIB_LIST_2
#   libz.so.1
#   libpng12.so.0
#   )

175

176 177
#set(ALLOWED_SYSTEM_DLLS ${GTK_LIB_LIST_1} ${GTK_LIB_LIST_2})
set(ALLOWED_SYSTEM_DLLS ${GTK_LIB_LIST_1}) # ${GTK_LIB_LIST_2})