Commit cceb306b authored by Guillaume Pasero's avatar Guillaume Pasero

SuperBuild: improve package generation

parent 164e8916
......@@ -39,7 +39,8 @@ file(WRITE "${CMAKE_BINARY_DIR}/PACKAGE-OTB/src/PACKAGE-OTB/CMakeLists.txt"
set(CMAKE_INSTALL_PREFIX \"${SB_INSTALL_PREFIX}\")
set(DOWNLOAD_LOCATION \"${DOWNLOAD_LOCATION}\")
set(SETUP_SCRIPT_SRC ${CMAKE_SOURCE_DIR}/CMake/pkgsetup.in)
set(OTB_USE_QT4 OFF)
set(WITH_OTBGUI ${OTB_USE_QT4})
set(WITH_MVD ${ENABLE_MONTEVERDI})
include(${CMAKE_SOURCE_DIR}/CMake/External_pkgtools.cmake)
include(${CMAKE_SOURCE_DIR}/CMake/Package_Macro.cmake)
superbuild_package(
......
......@@ -7,6 +7,7 @@ macro(superbuild_package)
list(APPEND PACKAGE_SEARCHDIRS "${PACKAGE_INSTALLDIR}/bin") #exe
list(APPEND PACKAGE_SEARCHDIRS "${PACKAGE_INSTALLDIR}/lib") #so
list(APPEND PACKAGE_SEARCHDIRS "${PACKAGE_INSTALLDIR}/lib/otb") #mvd so
list(APPEND PACKAGE_SEARCHDIRS "${PACKAGE_INSTALLDIR}/lib/otb/applications") #otb apps
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${PACKAGE_INSTALLDIR}/${PACKAGE_OUTDIR}")
......@@ -22,6 +23,11 @@ macro(superbuild_package)
list(APPEND PACKAGE_PEFILES ${PACKAGE_INSTALLDIR}/bin/otbApplicationLauncherQt)
endif()
if(WITH_MVD)
list(APPEND PACKAGE_PEFILES ${PACKAGE_INSTALLDIR}/bin/monteverdi)
list(APPEND PACKAGE_PEFILES ${PACKAGE_INSTALLDIR}/bin/mapla)
endif()
file(GLOB otbapps_list ${PACKAGE_INSTALLDIR}/lib/otb/applications/otbapp_*so) # /lib/otb
list(APPEND PACKAGE_PEFILES ${otbapps_list})
......@@ -61,6 +67,15 @@ SET(SYSTEM_DLLS
libpthread.so
libidn.so
libgomp.so*
ld-linux-x86-64.so*
libX11.so*
libXext.so*
libXau.so*
libXdmcp.so*
libXxf86vm.so*
libdrm.so.2
libGL.so*
libGLU.so*
)
## http://www.cmake.org/Wiki/CMakeMacroListOperations
......
......@@ -5,6 +5,9 @@ OUT=`pwd`
PATCH_ELF_EXE=$OUT/tools/patchelf
# no interference with LD_LIBRARY_PATH
LD_LIBRARY_PATH=
#setup bin and lib dirs
INSTALL_LIBDIRS=$OUT/lib
INSTALL_BINDIRS=$OUT/bin
......@@ -25,7 +28,7 @@ for lib in $INSTALL_LIBDIRS/otb/applications/*.so*; do
done
#run patchelf on otb executables
for bin in "$INSTALL_BINDIRS/otbTestDriver" "`ls $INSTALL_BINDIRS/otbApplicationLaunch*`"; do
for bin in $INSTALL_BINDIRS/otbTestDriver $(ls $INSTALL_BINDIRS/otbApplicationLauncher*) $INSTALL_BINDIRS/monteverdi $INSTALL_BINDIRS/mapla; do
# echo "adding rpath to $bin"
if [ -f $bin ]; then
$PATCH_ELF_EXE --set-rpath "$OUT/lib" $bin
......@@ -34,9 +37,9 @@ done
if [ -f lib/cmake/ITK-4.8/ITKConfig.cmake ]; then
rm -fr $INSTALL_BINDIRS/*
sed -i "s,/home/mrashad/dashboard/otb/install,$OUT,g" lib/cmake/ITK-4.8/Modules/ITKZLIB.cmake
sed -i "s,/home/mrashad/dashboard/otb/install,$OUT,g" lib/cmake/ITK-4.8/ITKConfig.cmake
sed -i "s,/home/mrashad/dashboard/otb/install,$OUT,g" lib/cmake/ITK-4.8/ITKTargets-release.cmake
sed -i "s,@CMAKE_INSTALL_PREFIX@,$OUT,g" lib/cmake/ITK-4.8/Modules/ITKZLIB.cmake
sed -i "s,@CMAKE_INSTALL_PREFIX@,$OUT,g" lib/cmake/ITK-4.8/ITKConfig.cmake
sed -i "s,@CMAKE_INSTALL_PREFIX@,$OUT,g" lib/cmake/ITK-4.8/ITKTargets-release.cmake
fi
rm -fr $OUT/tools
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment