Commit e2e5535b authored by Antoine Regimbeau's avatar Antoine Regimbeau
Browse files

Merge branch 'packaging_ci' into 'develop'

CI: packaging

See merge request orfeotoolbox/otb!491
No related merge requests found
Showing with 64 additions and 23 deletions
+64 -23
PROJCS["RGF93_Lambert_93",GEOGCS["GCS_RGF93",DATUM["D_RGF_1993",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",44],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",3],PARAMETER["false_easting",700000],PARAMETER["false_northing",6600000],UNIT["Meter",1]]
\ No newline at end of file
PROJCS["RGF93 / Lambert-93",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",44],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",3],PARAMETER["false_easting",700000],PARAMETER["false_northing",6600000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","2154"]]
File added
File added
...@@ -39,8 +39,11 @@ set(SUPERBUILD_BINARY_DIR "" CACHE PATH "path to superbuild binary directory") ...@@ -39,8 +39,11 @@ set(SUPERBUILD_BINARY_DIR "" CACHE PATH "path to superbuild binary directory")
set(SUPERBUILD_INSTALL_DIR "" CACHE PATH "path to superbuild install directory") set(SUPERBUILD_INSTALL_DIR "" CACHE PATH "path to superbuild install directory")
set(DOWNLOAD_LOCATION "" CACHE PATH "path to superbuild download archives") set(DOWNLOAD_LOCATION "" CACHE PATH "path to superbuild download archives")
#variables based on above user-defined variables #variables based on above user-defined variables
set(OTB_BINARY_DIR "${SUPERBUILD_BINARY_DIR}/OTB/build") message( "OTB_BINARY_DIR=${OTB_BINARY_DIR}" )
if ( NOT OTB_BINARY_DIR )
set(OTB_BINARY_DIR "${SUPERBUILD_BINARY_DIR}/OTB/build")
endif()
set(QT_TRANSLATIONS_DIR "${SUPERBUILD_INSTALL_DIR}/translations") set(QT_TRANSLATIONS_DIR "${SUPERBUILD_INSTALL_DIR}/translations")
get_filename_component(PACKAGE_OTB_SRC_DIR ${OTBPackaging_SOURCE_DIR} PATH) get_filename_component(PACKAGE_OTB_SRC_DIR ${OTBPackaging_SOURCE_DIR} PATH)
set(SUPERBUILD_SOURCE_DIR "${PACKAGE_OTB_SRC_DIR}/SuperBuild") set(SUPERBUILD_SOURCE_DIR "${PACKAGE_OTB_SRC_DIR}/SuperBuild")
...@@ -55,8 +58,9 @@ find_program(FILE_COMMAND NAMES "file") ...@@ -55,8 +58,9 @@ find_program(FILE_COMMAND NAMES "file")
find_program(READLINK NAMES "readlink") find_program(READLINK NAMES "readlink")
find_program(ZIP_EXECUTABLE NAMES 7z 7za) find_program(ZIP_EXECUTABLE NAMES 7z 7za)
#install prefix is same as SUPERBUILD_INSTALL_DIR. could be changed later if ( NOT CMAKE_INSTALL_PREFIX )
set(CMAKE_INSTALL_PREFIX "${SUPERBUILD_INSTALL_DIR}") set(CMAKE_INSTALL_PREFIX "${SUPERBUILD_INSTALL_DIR}")
endif()
#set CMAKE_MODULE_PATH to be the current source directory. #set CMAKE_MODULE_PATH to be the current source directory.
# This will allow including all cmake files without full path and .cmake extension! # This will allow including all cmake files without full path and .cmake extension!
...@@ -200,8 +204,6 @@ install_importlibs() ...@@ -200,8 +204,6 @@ install_importlibs()
install_python_bindings() install_python_bindings()
install_java_bindings()
install_share_dirs() install_share_dirs()
install_cmake_files() install_cmake_files()
......
...@@ -40,6 +40,8 @@ if(WIN32) ...@@ -40,6 +40,8 @@ if(WIN32)
set(cmake_gen "-GNinja") set(cmake_gen "-GNinja")
endif() endif()
message( "CMAKE_PREFIX_PATH: '${CMAKE_PREFIX_PATH}'" )
execute_process( execute_process(
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}
-DCMAKE_INSTALL_PREFIX=${PKG_DIR} -DCMAKE_INSTALL_PREFIX=${PKG_DIR}
...@@ -93,5 +95,5 @@ if( build_Pipeline_rv ) ...@@ -93,5 +95,5 @@ if( build_Pipeline_rv )
message(FATAL_ERROR "Build FAILED. build_Pipeline_ov=${build_Pipeline_ov}") message(FATAL_ERROR "Build FAILED. build_Pipeline_ov=${build_Pipeline_ov}")
return() return()
else() else()
message("Build PASSED. build_Pipeline_ov=${build_Pipeline_ov}") message("Build PASSED. build_Pipeline_ov=${build_Pipeline_ov}")
endif() endif()
...@@ -37,7 +37,6 @@ rd /S /Q lib\otb ...@@ -37,7 +37,6 @@ rd /S /Q lib\otb
del /S /Q lib\otb* del /S /Q lib\otb*
del /S /Q lib\python\*otbApplication.* || exit 1 del /S /Q lib\python\*otbApplication.* || exit 1
del /S /Q lib\java\org.otb.application.jar || exit 1
del /S /Q bin\otb* || exit 1 del /S /Q bin\otb* || exit 1
del /S /Q bin\monteverdi.exe || exit 1 del /S /Q bin\monteverdi.exe || exit 1
del /S /Q bin\mapla.exe || exit 1 del /S /Q bin\mapla.exe || exit 1
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
set -e set -e
rm -fr OUT_DIR/include/OTB-* rm -fr OUT_DIR/include/OTB-*
rm -f OUT_DIR/lib/{libotb*,libOTB*} rm -f OUT_DIR/lib/{libotb*,libOTB*}
rm -fr OUT_DIR/lib/{otb,python/*otbApplication*,java/org.otb.application.jar} rm -fr OUT_DIR/lib/{otb,python/*otbApplication*}
rm -fr OUT_DIR/lib/cmake/OTB-* rm -fr OUT_DIR/lib/cmake/OTB-*
rm -fr OUT_DIR/share/otb/ rm -fr OUT_DIR/share/otb/
rm -fv OUT_DIR/bin/{otb*,monteverdi,mapla} rm -fv OUT_DIR/bin/{otb*,monteverdi,mapla}
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# limitations under the License. # limitations under the License.
# #
function(detect_using_file_command input_file result_type result_dir) function(detect_using_file_command input_file result_type result_dir)
execute_process(COMMAND "${FILE_COMMAND}" "${input_file}" execute_process(COMMAND "${FILE_COMMAND}" "${input_file}"
RESULT_VARIABLE file_rv RESULT_VARIABLE file_rv
OUTPUT_VARIABLE file_ov OUTPUT_VARIABLE file_ov
...@@ -29,10 +29,17 @@ function(detect_using_file_command input_file result_type result_dir) ...@@ -29,10 +29,17 @@ function(detect_using_file_command input_file result_type result_dir)
message(FATAL_ERROR "${FILE_COMMAND} failed: ${file_rv}\n${file_ev}\n${file_ov}") message(FATAL_ERROR "${FILE_COMMAND} failed: ${file_rv}\n${file_ev}\n${file_ov}")
endif() endif()
# message( "file_ov: '${file_ov}'" )
get_filename_component(input_file_NAME ${input_file} NAME) get_filename_component(input_file_NAME ${input_file} NAME)
string(REPLACE "${input_file}" " _file_full_ " file_ov "${file_ov}") string(REPLACE "${input_file}" " _file_full_ " file_ov "${file_ov}")
string(TOLOWER "${file_ov}" file_ov_lower) string(TOLOWER "${file_ov}" file_ov_lower)
# message( "input_file: '${input_file}'" )
# message( "input_file_NAME: '${input_file_NAME}'" )
# message( "file_ov: '${file_ov}'" )
# message( "file_ov_lower: '${file_ov_lower}'" )
set(detected_type) set(detected_type)
set(detected_dir) set(detected_dir)
# below executable check works for both mac osx and linux # below executable check works for both mac osx and linux
...@@ -85,9 +92,9 @@ function(detect_using_file_command input_file result_type result_dir) ...@@ -85,9 +92,9 @@ function(detect_using_file_command input_file result_type result_dir)
set(is_this_a_symbolic_link FALSE) set(is_this_a_symbolic_link FALSE)
set(target_file) set(target_file)
isfile_symlink("${input_file}" is_this_a_symbolic_link target_file) isfile_symlink("${input_file}" is_this_a_symbolic_link target_file)
if(is_this_a_symbolic_link) if(is_this_a_symbolic_link)
if(target_file) if(target_file)
set(libdir "lib") set(libdir "lib")
setif_value_in_list(is_gtk_lib "${input_file_NAME}" GTK_LIB_LIST_1) setif_value_in_list(is_gtk_lib "${input_file_NAME}" GTK_LIB_LIST_1)
...@@ -105,6 +112,18 @@ function(detect_using_file_command input_file result_type result_dir) ...@@ -105,6 +112,18 @@ function(detect_using_file_command input_file result_type result_dir)
message(FATAL_ERROR "unknown/untracked file type found: ${input_file}") message(FATAL_ERROR "unknown/untracked file type found: ${input_file}")
endif() #if("${file_ov_lower}" MATCHES ...) endif() #if("${file_ov_lower}" MATCHES ...)
# Patch file command returning shared-oject for executable on Linux when -PIE is used.
if( LINUX )
get_filename_component( input_file_DIR ${input_file} DIRECTORY )
get_filename_component( input_file_dIR ${input_file_DIR} NAME )
string( TOLOWER "${input_file_DIR}" input_file_DIR )
if( ${input_file_DIR} MATCHES "bin" )
message( WARNING "${input_file} detected as shared-object." )
set(detected_type PROGRAMS)
set(detected_dir bin)
endif()
endif()
#message("detected_type=${detected_type}") #message("detected_type=${detected_type}")
set(${result_type} "${detected_type}" PARENT_SCOPE) set(${result_type} "${detected_type}" PARENT_SCOPE)
set(${result_dir} "${detected_dir}" PARENT_SCOPE) set(${result_dir} "${detected_dir}" PARENT_SCOPE)
......
...@@ -22,13 +22,13 @@ include(patch_cmake_files.cmake) ...@@ -22,13 +22,13 @@ include(patch_cmake_files.cmake)
function(install_cmake_files) function(install_cmake_files)
patch_cmake_files(NAME "ITK" patch_cmake_files(NAME "ITK"
VERSION "${PKG_ITK_SB_VERSION}" VERSION "${PKG_ITK_SB_VERSION}"
MATCH_STRING "${CMAKE_INSTALL_PREFIX}" MATCH_STRING "${SUPERBUILD_INSTALL_DIR}"
REPLACE_VAR "ITK_INSTALL_PREFIX" REPLACE_VAR "ITK_INSTALL_PREFIX"
) )
patch_cmake_files(NAME "OTB" patch_cmake_files(NAME "OTB"
VERSION "${PKG_OTB_VERSION_MAJOR}.${PKG_OTB_VERSION_MINOR}" VERSION "${PKG_OTB_VERSION_MAJOR}.${PKG_OTB_VERSION_MINOR}"
MATCH_STRING "${CMAKE_INSTALL_PREFIX}" MATCH_STRING "${SUPERBUILD_INSTALL_DIR}"
REPLACE_VAR "OTB_INSTALL_PREFIX" REPLACE_VAR "OTB_INSTALL_PREFIX"
) )
......
...@@ -164,6 +164,18 @@ add_custom_command(OUTPUT otb_depends_done.txt ...@@ -164,6 +164,18 @@ add_custom_command(OUTPUT otb_depends_done.txt
DEPENDS ${OTB_DEPENDENCIES} DEPENDS ${OTB_DEPENDENCIES}
) )
add_custom_target( EMBED_COPYRIGHT
COMMAND ${CMAKE_COMMAND} -E copy
${OTB_SB_SRC}/LICENSE ${CMAKE_INSTALL_PREFIX}/share/copyright/LICENSE
COMMAND ${CMAKE_COMMAND} -E copy
${OTB_SB_SRC}/NOTICE ${CMAKE_INSTALL_PREFIX}/share/copyright/NOTICE
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/Copyright ${CMAKE_INSTALL_PREFIX}/share/copyright
)
add_custom_target(OTB_DEPENDS add_custom_target(OTB_DEPENDS
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/otb_depends_done.txt DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/otb_depends_done.txt
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
...@@ -171,6 +183,9 @@ add_custom_target(OTB_DEPENDS ...@@ -171,6 +183,9 @@ add_custom_target(OTB_DEPENDS
VERBATIM VERBATIM
) )
add_dependencies( OTB_DEPENDS
EMBED_COPYRIGHT
)
ExternalProject_Add(OTB ExternalProject_Add(OTB
DEPENDS ${OTB_DEPENDENCIES} DEPENDS ${OTB_DEPENDENCIES}
...@@ -219,14 +234,10 @@ ExternalProject_Add(OTB ...@@ -219,14 +234,10 @@ ExternalProject_Add(OTB
ExternalProject_Add_Step( ExternalProject_Add_Step(
OTB install_copyright OTB install_copyright
COMMAND ${CMAKE_COMMAND} -E copy
${OTB_SB_SRC}/LICENSE ${CMAKE_INSTALL_PREFIX}/share/copyright/LICENSE
COMMAND ${CMAKE_COMMAND} -E copy
${OTB_SB_SRC}/NOTICE ${CMAKE_INSTALL_PREFIX}/share/copyright/NOTICE
COMMAND ${CMAKE_COMMAND}
-E copy_directory
${CMAKE_SOURCE_DIR}/Copyright ${CMAKE_INSTALL_PREFIX}/share/copyright
DEPENDEES install DEPENDEES install
) )
ExternalProject_Add_StepDependencies(
OTB install_copyright
EMBED_COPYRIGHT
)
Supports Markdown
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