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

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

# 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
141
  libcups.*dylib
142 143 144 145 146 147 148 149 150 151 152 153
  )

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)

154 155 156 157 158 159 160 161 162
# 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/
  )

163 164 165 166 167 168 169 170 171
#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.
172 173

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

186

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