PackageGlobals.cmake 3.91 KB
Newer Older
1
#
2
# Copyright (C) 2005-2020 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
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
set(WINDOWS_SYSTEM_DLLS
46
  WTSAPI32.dll
47
  advapi32.dll
48
  comdlg32.dll
49
  crypt32.dll
50 51 52
  d2d1.dll
  d3d11.dll
  d3d9.dll
53
  dnsapi.dll
54
  dwmapi.dll
55
  dwrite.dll
56
  dxgi.dll
57
  gdi32.dll
58
  glu32.dll
59
  imm32.dll
60
  iphlpapi.dll
61
  kernel32.dll
62
  mpr.dll
63
  netapi32.dll
64 65
  normaliz.dll
  odbc32.dll
66 67 68
  ole32.dll
  oleaut32.dll
  opengl32.dll
69 70
  psapi.dll
  python...dll
71 72 73 74 75
  rpcrt4.dll
  secur32.dll
  shell32.dll
  shfolder.dll
  user32.dll
76 77 78
  userenv.dll
  uxtheme.dll
  version.dll
79 80 81 82 83
  winmm.dll
  winspool.drv
  wldap32.dll
  ws2_32.dll
  wsock32.dll
84 85 86 87
  )

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

# 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
146
  libcups.*dylib
147
  libomp.dylib
148
  libqcocoa.dylib
149 150 151 152 153 154 155 156 157 158 159 160
  )

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)

161 162 163 164 165 166 167 168 169
# 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/
  )

170 171 172 173 174 175 176 177 178
#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.
179 180

set(GTK_LIB_LIST_1
181 182 183 184
  libgthread-2.0.so.0
  libglib-2.0.so.0
  libgobject-2.0.so.0
  libXrender.so.1
185
  libpcre.so.3
186
  libffi.so.6
187
  )
188 189 190 191 192 193
# set(GTK_LIB_LIST_2
#   libz.so.1
#   libpng12.so.0
#   )

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