Commit 9f5d455f authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

PKG: use a OTB_INSTALL_DIR to be flexible with windows and unix packaging

parent 4308fbdd
......@@ -133,7 +133,6 @@ function(install_common include_mvd)
OTB_APPLICATIONS_DIR
PKG_STAGE_DIR
PACKAGE_SUPPORT_FILES_DIR
CMAKE_INSTALL_PREFIX
OTB_INSTALL_DIR
)
if(NOT DEFINED ${req})
......@@ -335,7 +334,7 @@ function(configure_package)
foreach(EXE_FILE monteverdi
mapla)
if(EXISTS "${CMAKE_INSTALL_PREFIX}/bin/${EXE_FILE}${EXE_EXT}")
if(EXISTS "${OTB_INSTALL_DIR}/bin/${EXE_FILE}${EXE_EXT}")
#VAR_IN_PKGSETUP_CONFIGURE might seem a bit redundant variable if you
#consider PKG_PEFILES which also has same content.
#But VAR_IN_PKGSETUP_CONFIGURE goes into pkgsetup.in for Linux standalone binaries
......@@ -343,7 +342,7 @@ function(configure_package)
# process_deps() function
set(VAR_IN_PKGSETUP_CONFIGURE "${VAR_IN_PKGSETUP_CONFIGURE} bin/${EXE_FILE}${EXE_EXT}")
list(APPEND PKG_PEFILES
"${CMAKE_INSTALL_PREFIX}/bin/${EXE_FILE}${EXE_EXT}")
"${OTB_INSTALL_DIR}/bin/${EXE_FILE}${EXE_EXT}")
endif()
#For Unixes we write the startup script in the *pkgsetup.in
if(WIN32 OR CMAKE_CROSSCOMPILING)
......
......@@ -15,17 +15,15 @@ macro(superbuild_package)
include(GetPrerequisites)
#CMAKE_INSTALL_PREFIX -> SB_INSTALL_PREFIX
#"${PKG_MXEROOT}/usr/x86_64-w64-mingw32.shared/bin")
set(DEPENDENCIES_INSTALL_DIR ${SB_INSTALL_PREFIX})
set(OTB_INSTALL_DIR ${SB_INSTALL_PREFIX})
#a helper variable. rethink
set(DEPENDENCIES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
set(PKG_SEARCHDIRS)
set(OTB_APPLICATIONS_DIR "${OTB_INSTALL_DIR}/lib/otb/applications")
list(APPEND PKG_SEARCHDIRS "${CMAKE_INSTALL_PREFIX}/bin") #exe
list(APPEND PKG_SEARCHDIRS "${CMAKE_INSTALL_PREFIX}/lib") #so
list(APPEND PKG_SEARCHDIRS "${CMAKE_INSTALL_PREFIX}/lib/otb") #mvd so
list(APPEND PKG_SEARCHDIRS "${CMAKE_INSTALL_PREFIX}/lib/otb/applications") #otb apps
list(APPEND PKG_SEARCHDIRS "${OTB_INSTALL_DIR}/bin") #exe
list(APPEND PKG_SEARCHDIRS "${OTB_INSTALL_DIR}/lib") #so
list(APPEND PKG_SEARCHDIRS "${OTB_INSTALL_DIR}/lib/otb") #mvd so
list(APPEND PKG_SEARCHDIRS "${OTB_APPLICATIONS_DIR}") #otb apps
empty_package_staging_directory()
......@@ -60,7 +58,7 @@ macro(superbuild_package)
if(UNIX)
if(NOT APPLE)
####################### install patchelf #####################
install(FILES ${CMAKE_INSTALL_PREFIX}/tools/patchelf
install(FILES ${SB_INSTALL_PREFIX}/tools/patchelf
DESTINATION ${PKG_STAGE_DIR}/tools
PERMISSIONS
OWNER_EXECUTE OWNER_WRITE OWNER_READ
......
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