Skip to content
Snippets Groups Projects
Commit cfb7e5f2 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

PKG: check for python wrapping if asked with OTB_WRAP_PYTHON

parent 56e50184
No related branches found
No related tags found
No related merge requests found
......@@ -100,6 +100,10 @@ cat > "$OUT_DIR/bin/qt.conf" << EOF
EOF
WITH_PYTHON=@WITH_PYTHON@
if [ "$WITH_PYTHON" = true ] ; then
if [ ! -f "$OTB_PYTHON_EXE" ] ; then
OTB_PYTHON_EXE=$(which python)
fi
......@@ -149,6 +153,8 @@ else
printf %s\\n "eg: ln -s /usr/lib/x86_64-linux-gnu/$python_INSTSONAME $OUT_DIR/lib/$python_INSTALLED_SONAME"
fi
fi;
# PKG_OTB_VERSION_STRING=@PKG_OTB_VERSION_STRING@
sed -i "s,|release|,@PKG_OTB_VERSION_STRING@,g" "$OUT_DIR/README"
......
......@@ -49,27 +49,27 @@ macro(macro_setup_cmake_project pkg)
"cmake_minimum_required(VERSION 3.2)
include(CMakeParseArguments)
include(CMakeDetermineSystem)
set(CMAKE_BUILD_TYPE Release)
set(PACKAGE_OTB_SRC_DIR \"${PACKAGE_OTB_SRC_DIR}\")
set(OTB_BINARY_DIR \"${OTB_BINARY_DIR}\")
set(OTB_INSTALL_DIR \"${OTB_INSTALL_DIR}\")
set(OTB_INSTALL_DATA_DIR \"${PKG_OTB_INSTALL_DATA_DIR}\")
set(QT_PLUGINS_DIR \"${QT_PLUGINS_DIR}\")
set(QT_TRANSLATIONS_DIR \"${QT_TRANSLATIONS_DIR}\")
set(DEPENDENCIES_INSTALL_DIR \"${DEPENDENCIES_INSTALL_DIR}\")
set(PACKAGE_SUPPORT_FILES_DIR \"${PACKAGE_OTB_SRC_DIR}/SuperBuild/Packaging/Files\")
set(CMAKE_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")
set(PKG_ITK_SB_VERSION \"${PKG_ITK_SB_VERSION}\")
set(PKG_OTB_VERSION_MAJOR \"${PKG_OTB_VERSION_MAJOR}\")
set(PKG_OTB_VERSION_MINOR \"${PKG_OTB_VERSION_MINOR}\")
set(PKG_OTB_VERSION_PATCH \"${PKG_OTB_VERSION_PATCH}\")
set(PKG_OTB_VERSION_STRING \"${PKG_OTB_VERSION_STRING}\")
set(CMAKE_BUILD_TYPE Release)
set(PACKAGE_OTB_SRC_DIR \"${PACKAGE_OTB_SRC_DIR}\")
set(OTB_BINARY_DIR \"${OTB_BINARY_DIR}\")
set(OTB_INSTALL_DIR \"${OTB_INSTALL_DIR}\")
set(OTB_INSTALL_DATA_DIR \"${PKG_OTB_INSTALL_DATA_DIR}\")
set(QT_PLUGINS_DIR \"${QT_PLUGINS_DIR}\")
set(QT_TRANSLATIONS_DIR \"${QT_TRANSLATIONS_DIR}\")
set(DEPENDENCIES_INSTALL_DIR \"${DEPENDENCIES_INSTALL_DIR}\")
set(PACKAGE_SUPPORT_FILES_DIR \"${PACKAGE_OTB_SRC_DIR}/SuperBuild/Packaging/Files\")
set(CMAKE_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")
set(PKG_ITK_SB_VERSION \"${PKG_ITK_SB_VERSION}\")
set(PKG_OTB_VERSION_MAJOR \"${PKG_OTB_VERSION_MAJOR}\")
set(PKG_OTB_VERSION_MINOR \"${PKG_OTB_VERSION_MINOR}\")
set(PKG_OTB_VERSION_PATCH \"${PKG_OTB_VERSION_PATCH}\")
set(PKG_OTB_VERSION_STRING \"${PKG_OTB_VERSION_STRING}\")
set(PYTHON_EXECUTABLE \"${PYTHON_EXECUTABLE}\")
set(PKG_GENERATE_XDK ${PKG_GENERATE_XDK})
set(PATCHELF_PROGRAM ${PATCHELF_PROGRAM})
set(OTB_TARGET_SYSTEM_ARCH ${OTB_TARGET_SYSTEM_ARCH})
set(OTB_TARGET_SYSTEM_ARCH_IS_X64 ${OTB_TARGET_SYSTEM_ARCH_IS_X64})
set(PYTHON_EXECUTABLE \"${PYTHON_EXECUTABLE}\")
set(OTB_WRAP_PYTHON ${OTB_WRAP_PYTHON})
${EXTRA_CACHE_CONFIG}
include(${SUPERBUILD_SOURCE_DIR}/Packaging/PackageHelper.cmake)
macro_super_package(STAGE_DIR \"${archive_name}\")"
......
......@@ -145,8 +145,13 @@ macro(macro_super_package)
file(APPEND ${CMAKE_BINARY_DIR}/make_symlinks
"${make_symlink_cmd}\n")
endforeach()
set(WITH_PYTHON "false")
if(OTB_WRAP_PYTHON)
set(WITH_PYTHON "true")
endif()
set(IS_XDK "false")
set(IS_XDK "false")
if(PKG_GENERATE_XDK)
set(IS_XDK "true")
if("${PKG_ITK_SB_VERSION}" STREQUAL "")
......@@ -668,7 +673,11 @@ function(func_prepare_package)
install(
DIRECTORY
${OTB_INSTALL_DIR}/lib/otb/python
DESTINATION ${PKG_STAGE_DIR}/lib)
DESTINATION ${PKG_STAGE_DIR}/lib/)
else()
if(OTB_WRAP_PYTHON)
message(FATAL_ERROR "OTB_WRAP_PYTHON is set , but cannot find _otbApplication${PYMODULE_EXT}")
endif()
endif()
# Take gtk libs from system. we should fix this to take from custom
......@@ -833,6 +842,8 @@ function(func_process_deps infile)
if(MSVC)
string(REGEX MATCHALL "dependencies.(.*[Dd][Ll][Ll])" loader_ov "${loader_ov}")
string(REGEX REPLACE "dependencies.." "" loader_ov "${loader_ov}")
# take out string 'Image has the following'
string(REGEX REPLACE "Image.has.the.following" "" loader_ov "${loader_ov}")
#beware of .DLL and .dll
string(REGEX REPLACE ".DLL" ".dll" loader_ov "${loader_ov}")
#convert to cmake list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment