Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sébastien Peillet
otb
Commits
061cc103
Commit
061cc103
authored
8 years ago
by
Rashad Kanavath
Browse files
Options
Downloads
Patches
Plain Diff
PKG: fixes xdk. patch specific for ITK libs
parent
310be201
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SuperBuild/Packaging/InstallSupportFiles.cmake
+13
-31
13 additions, 31 deletions
SuperBuild/Packaging/InstallSupportFiles.cmake
SuperBuild/Packaging/PackageHelper.cmake
+69
-60
69 additions, 60 deletions
SuperBuild/Packaging/PackageHelper.cmake
with
82 additions
and
91 deletions
SuperBuild/Packaging/InstallSupportFiles.cmake
+
13
−
31
View file @
061cc103
...
...
@@ -47,45 +47,30 @@ function(func_install_xdk_files)
endif
()
endforeach
()
file
(
GLOB LIB_CMAKE_DIRS
"
${
DEPENDENCIES_INSTALL_DIR
}
/lib/cmake/*"
)
foreach
(
LIB_CMAKE_DIR
${
LIB_CMAKE_DIRS
}
)
get_filename_component
(
LIB_CMAKE_DIR_name_we
${
LIB_CMAKE_DIR
}
NAME_WE
)
if
(
NOT
"
${
LIB_CMAKE_DIR_name_we
}
"
MATCHES
"OTB"
)
func_install_without_message
(
"
${
LIB_CMAKE_DIR
}
"
"lib/cmake"
)
endif
()
file
(
GLOB ITK_CMAKE_DIRS
"
${
DEPENDENCIES_INSTALL_DIR
}
/lib/cmake/ITK*"
)
foreach
(
ITK_CMAKE_DIR
${
ITK_CMAKE_DIRS
}
)
func_install_without_message
(
"
${
ITK_CMAKE_DIR
}
"
"lib/cmake"
)
endforeach
()
set
(
QT_REQ_DIRS
)
if
(
WIN32
)
#only affects windows due to regex on dll
#.lib are not taken when processing dependencies.
# We just get .dlls which is enough for binary package
# For XDK, we need .lib files when building OTB using xdk
# For Linux. we get .so.X.Y.Z by finding the 'target'
# of any .so file. So there is no need for such a copy on
# Linux and OSX
if
(
MSVC
)
file
(
GLOB LIB_FILES
"
${
DEPENDENCIES_INSTALL_DIR
}
/lib/*.lib"
)
else
()
file
(
GLOB LIB_FILES
"
${
DEPENDENCIES_INSTALL_DIR
}
/lib/*dll.*"
)
endif
()
#func_lisp(LIB_FILES )
foreach
(
LIB_FILE
${
LIB_FILES
}
)
pkg_install_rule
(
${
LIB_FILE
}
)
endforeach
()
##install(FILES ${LIB_FILES} DESTINATION ${PKG_STAGE_DIR}/lib )
#file(GLOB ITK_EXTRA_DLL_FILES_1 "${DEPENDENCIES_INSTALL_DIR}/bin/libITK*.dll")
#install(FILES ${ITK_EXTRA_DLL_FILES_1} DESTINATION ${PKG_STAGE_DIR}/bin)
file
(
GLOB ITK_EXTRA_DLL_FILES_2
"
${
DEPENDENCIES_INSTALL_DIR
}
/bin/itk*.dll"
)
install
(
FILES
${
ITK_EXTRA_DLL_FILES_2
}
DESTINATION
${
PKG_STAGE_DIR
}
/bin
)
#file(GLOB OPENCV_EXTRA_DLL_FILES "${DEPENDENCIES_INSTALL_DIR}/bin/libopencv*.dll")
#install(FILES ${OPENCV_EXTRA_DLL_FILES} DESTINATION ${PKG_STAGE_DIR}/bin)
#file(GLOB OPENCV_EXTRA_A_FILES "${DEPENDENCIES_INSTALL_DIR}/lib/libopencv*.a")
#install(FILES ${OPENCV_EXTRA_A_FILES} DESTINATION ${PKG_STAGE_DIR}/lib)
#mxe installs qt in a separate directory under install prefix. So..
set
(
QT_INSTALL_DIR
"
${
DEPENDENCIES_INSTALL_DIR
}
/qt"
)
#qt/bin is also a special case for mxe.
file
(
GLOB QT_EXTRA_DLL_FILES
"
${
DEPENDENCIES_INSTALL_DIR
}
/qt/bin/*.dll"
)
install
(
FILES
${
QT_EXTRA_DLL_FILES
}
DESTINATION
${
PKG_STAGE_DIR
}
/bin
)
...
...
@@ -94,16 +79,13 @@ function(func_install_xdk_files)
list
(
APPEND QT_REQ_DIRS include
)
list
(
APPEND QT_REQ_DIRS imports
)
#mxe installs qt in a separate directory under install prefix. So..
set
(
QT_INSTALL_DIR
"
${
DEPENDENCIES_INSTALL_DIR
}
/qt"
)
else
()
set
(
QT_INSTALL_DIR
"
${
DEPENDENCIES_INSTALL_DIR
}
"
)
set
(
QT_INSTALL_DIR
"
${
DEPENDENCIES_INSTALL_DIR
}
"
)
endif
(
WIN32
)
if
(
NOT QT_EXECUTABLES
)
message
(
FATAL_ERROR
"QT_EXECUTABLES not set"
)
endif
()
list
(
APPEND QT_REQ_DIRS mkspecs
)
list
(
APPEND QT_REQ_DIRS plugins
)
list
(
APPEND QT_REQ_DIRS translations
)
...
...
This diff is collapsed.
Click to expand it.
SuperBuild/Packaging/PackageHelper.cmake
+
69
−
60
View file @
061cc103
...
...
@@ -52,6 +52,23 @@ macro(macro_super_package)
include
(
GetPrerequisites
)
set
(
LOADER_PROGRAM_ARGS
${
loader_program_args
}
)
set
(
DEST_LIB_DIR lib
)
set
(
DEST_BIN_DIR bin
)
set
(
DEST_APP_DIR lib/otb/applications
)
set
(
EXE_EXT
""
)
set
(
SCR_EXT
".sh"
)
set
(
LIB_EXT
".so"
)
set
(
PYMODULE_EXT
".so"
)
if
(
WIN32
)
set
(
EXE_EXT
".exe"
)
set
(
LIB_EXT
".dll"
)
set
(
SCR_EXT
".bat"
)
set
(
PYMODULE_EXT
".pyd"
)
set
(
DEST_LIB_DIR bin
)
elseif
(
APPLE
)
set
(
LIB_EXT
".dylib"
)
endif
()
# find_loader_and_args(LOADER_PROGRAM LOADER_PROGRAM_ARGS)
...
...
@@ -109,20 +126,14 @@ macro(macro_super_package)
list
(
APPEND PKG_SEARCHDIRS
"
${
OTB_APPLICATIONS_DIR
}
"
)
#otb apps
list
(
APPEND PKG_SEARCHDIRS
"
${
OTB_INSTALL_DIR
}
/lib/otb/python"
)
#otbApplication.py
set
(
EXE_SEARCHDIRS
${
OTB_INSTALL_DIR
}
/bin
)
list
(
APPEND EXE_SEARCHDIRS
${
DEPENDENCIES_INSTALL_DIR
}
/bin
)
if
(
PKG_GENERATE_XDK
)
list
(
APPEND PKG_SEARCHDIRS
${
OTB_BINARY_DIR
}
/bin
)
endif
()
macro_empty_package_staging_directory
()
set
(
PKG_PEFILES
)
set
(
QT_EXECUTABLES
)
list
(
APPEND QT_EXECUTABLES
"lrelease"
)
list
(
APPEND QT_EXECUTABLES
"moc"
)
list
(
APPEND QT_EXECUTABLES
"qmake"
)
list
(
APPEND QT_EXECUTABLES
"rcc"
)
list
(
APPEND QT_EXECUTABLES
"uic"
)
func_prepare_package
()
set
(
program_list
)
...
...
@@ -201,73 +212,73 @@ endmacro(macro_super_package)
function
(
func_prepare_package
)
set
(
DEST_LIB_DIR lib
)
set
(
DEST_BIN_DIR bin
)
set
(
DEST_APP_DIR lib/otb/applications
)
set
(
EXE_EXT
""
)
set
(
SCR_EXT
".sh"
)
set
(
LIB_EXT
".so"
)
set
(
PYMODULE_EXT
".so"
)
if
(
WIN32
)
set
(
EXE_EXT
".exe"
)
set
(
LIB_EXT
".dll"
)
set
(
SCR_EXT
".bat"
)
set
(
PYMODULE_EXT
".pyd"
)
set
(
DEST_LIB_DIR bin
)
elseif
(
APPLE
)
set
(
LIB_EXT
".dylib"
)
endif
()
file
(
WRITE
${
CMAKE_BINARY_DIR
}
/make_symlinks_temp
""
)
#This must exist in any OTB Installation. minimal or full
set
(
PKG_PEFILES
"
${
OTB_INSTALL_DIR
}
/bin/otbApplicationLauncherCommandLine
${
EXE_EXT
}
"
)
#
set(PKG_PEFILES "${OTB_INSTALL_DIR}/bin/otbApplicationLauncherCommandLine${EXE_EXT}")
if
(
NOT EXISTS
"
${
OTB_INSTALL_DIR
}
/bin/otbApplicationLauncherCommandLine
${
EXE_EXT
}
"
)
message
(
FATAL_ERROR
"
${
OTB_INSTALL_DIR
}
/bin/otbApplicationLauncherCommandLine
${
EXE_EXT
}
not found."
)
endif
()
set
(
PKG_PEFILES
"otbApplicationLauncherCommandLine
${
EXE_EXT
}
"
)
#set(EXE_FILES)
list
(
APPEND PKG_PEFILES
"otbApplicationLauncherQt
${
EXE_EXT
}
"
)
list
(
APPEND PKG_PEFILES
"iceViewer
${
EXE_EXT
}
"
)
list
(
APPEND PKG_PEFILES
"otbTestDriver
${
EXE_EXT
}
"
)
list
(
APPEND PKG_PEFILES
"monteverdi
${
EXE_EXT
}
"
)
list
(
APPEND PKG_PEFILES
"mapla
${
EXE_EXT
}
"
)
#itk
#list(APPEND EXE_FILES "itkTestDriver")
set
(
EXE_FILES
)
list
(
APPEND EXE_FILES
"otbApplicationLauncherQt"
)
list
(
APPEND EXE_FILES
"iceViewer"
)
list
(
APPEND EXE_FILES
"otbTestDriver"
)
if
(
PKG_GENERATE_XDK
)
#itk
list
(
APPEND EXE_FILES
"itkTestDriver"
)
#Qt stuff
list
(
APPEND EXE_FILES
${
QT_EXECUTABLES
}
)
list
(
APPEND PKG_PEFILES
"lrelease
${
EXE_EXT
}
"
)
list
(
APPEND PKG_PEFILES
"moc
${
EXE_EXT
}
"
)
list
(
APPEND PKG_PEFILES
"qmake
${
EXE_EXT
}
"
)
list
(
APPEND PKG_PEFILES
"rcc
${
EXE_EXT
}
"
)
list
(
APPEND PKG_PEFILES
"uic
${
EXE_EXT
}
"
)
list
(
APPEND PKG_PEFILES
"sharkVersion
${
EXE_EXT
}
"
)
list
(
APPEND PKG_PEFILES
"proj
${
EXE_EXT
}
"
)
list
(
APPEND PKG_PEFILES
"cs2cs
${
EXE_EXT
}
"
)
#RK: there is a bug in itk cmake files in install tree
#we workaround with below code
#start hack
file
(
GLOB itk_lib_files
"
${
DEPENDENCIES_INSTALL_DIR
}
/bin/itk*
${
LIB_EXT
}
"
"
${
DEPENDENCIES_INSTALL_DIR
}
/bin/ITK*
${
LIB_EXT
}
"
)
foreach
(
itk_lib_file
${
itk_lib_files
}
)
if
(
NOT EXISTS
"
${
itk_lib_file
}
"
)
message
(
FATAL_ERROR
"{itk_lib_file} does not exist"
)
endif
()
list
(
APPEND PKG_PEFILES
"
${
itk_lib_file
}
"
)
endforeach
()
#end hack
file
(
GLOB otb_test_exe_list
"
${
DEPENDENCIES_INSTALL_DIR
}
/bin/gdal*
${
EXE_EXT
}
"
"
${
OTB_BINARY_DIR
}
/bin/*Test*
${
EXE_EXT
}
"
)
foreach
(
otb_test_exe
${
otb_test_exe_list
}
)
get_filename_component
(
otb_test_exe_name
${
otb_test_exe
}
NAME
)
list
(
APPEND PKG_PEFILES
${
otb_test_exe_name
}
)
endforeach
()
endif
()
list
(
APPEND EXE_FILES
"monteverdi"
)
list
(
APPEND EXE_FILES
"mapla"
)
foreach
(
EXE_FILE
${
EXE_FILES
}
)
set
(
FOUND_
${
EXE_FILE
}
FALSE
)
foreach
(
EXE_SEARCHDIR
${
EXE_SEARCHDIRS
}
)
if
(
NOT FOUND_
${
EXE_FILE
}
)
if
(
EXISTS
"
${
EXE_SEARCHDIR
}
/
${
EXE_FILE
}${
EXE_EXT
}
"
)
set
(
FOUND_
${
EXE_FILE
}
TRUE
)
list
(
APPEND PKG_PEFILES
"
${
EXE_SEARCHDIR
}
/
${
EXE_FILE
}${
EXE_EXT
}
"
)
endif
()
endif
()
#(NOT FOUND_${EXE_FILE})
endforeach
()
#EXE_SEARCH_DIR
endforeach
()
# special case for msvc: ucrtbase.dll must be explicitly vetted.
if
(
MSVC AND NOT PKG_GENERATE_XDK
)
list
(
APPEND PKG_PEFILES
"ucrtbase.dll"
)
endif
()
#loop again to report if anything is not found
foreach
(
EXE_FILE
${
EXE_FILES
}
)
if
(
NOT FOUND_
${
EXE_FILE
}
)
message
(
STATUS
"'
${
OTB_INSTALL_DIR
}
/bin/
${
EXE_FILE
}${
EXE_EXT
}
'(not found. skipping)"
)
endif
()
endforeach
()
file
(
GLOB OTB_APPS_LIST
"
${
OTB_APPLICATIONS_DIR
}
/otbapp_*
${
LIB_EXT
}
"
)
# /lib/otb
list
(
APPEND PKG_PEFILES
${
OTB_APPS_LIST
}
)
...
...
@@ -474,11 +485,9 @@ function(pkg_install_rule src_file)
)
set
(
SKIP_INSTALL TRUE
)
message
(
"SKIP_INSTALL for
${
src_file_NAME
}
"
)
message
(
"SKIP_INSTALL for
${
src_file_NAME
}
"
)
endif
()
endif
()
if
(
NOT SKIP_INSTALL
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment