PackageGlobals.cmake 3.85 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
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
  dnsapi.dll
50
  dwmapi.dll
51
  dwrite.dll
52
  d2d1.dll
53
  d3d9.dll
54
  d3d11.dll
55
  gdi32.dll
56
  glu32.dll
57
  imm32.dll
58
  iphlpapi.dll
59
  kernel32.dll
60
  netapi32.dll
61
  normaliz.dll
62
  mpr.dll
63
  odbc32.dll
64 65 66
  ole32.dll
  oleaut32.dll
  opengl32.dll
67 68
  psapi.dll
  python...dll
69 70 71 72 73
  rpcrt4.dll
  secur32.dll
  shell32.dll
  shfolder.dll
  user32.dll
74 75 76
  userenv.dll
  uxtheme.dll
  version.dll
77 78 79 80 81
  winmm.dll
  winspool.drv
  wldap32.dll
  ws2_32.dll
  wsock32.dll
82 83 84 85
  )

set(LINUX_SYSTEM_DLLS
  libm.so
86
  libc.so.*
87
  libstdc*
88 89 90 91 92 93 94 95
  libgcc_s.so
  librt.so
  libdl.so
  libpthread.so
  libidn.so
  libgomp.so*
  ld-linux-x86-64.so*
  libX11.so*
96 97 98
  libXi.so*  #GLUT
  libXcursor.so* #GLFW
  libXinerama.so*  #GLFW
99 100 101 102 103 104 105 106 107 108 109 110
  libXext.so*
  libXau.so*
  libXdmcp.so*
  libXxf86vm.so*
  libdrm.so.2
  libGL.so*
  libGLU.so*
  libXrender.so*
  libSM.so*
  libICE.so*
  libXrandr.so*
  libpython*
111 112 113 114 115 116
  libxcb.so*
  libxcb-glx.so*
  libX11-xcb.so*
  libmysqlclient.so*
  libodbc.so*
  libpq.so*
117
  libEGL.so*
118
  )
119 120 121 122 123
  # libexpat.so.*
  # libfontconfig.so*
  # libfreetype.so*
  # libwebp.so*
  # )
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
143
  libcups.*dylib
144
  libomp.dylib
145 146 147 148 149 150 151 152 153 154 155 156
  )

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)

157 158 159 160 161 162 163 164 165
# 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/
  )

166 167 168 169 170 171 172 173 174
#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.
175 176

set(GTK_LIB_LIST_1
177 178 179 180
  libgthread-2.0.so.0
  libglib-2.0.so.0
  libgobject-2.0.so.0
  libXrender.so.1
181
  libpcre.so.3
182
  libffi.so.6
183
  )
184 185 186 187 188 189
# set(GTK_LIB_LIST_2
#   libz.so.1
#   libpng12.so.0
#   )

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