Commit 8e462a72 authored by Arnaud Billon's avatar Arnaud Billon
Browse files

Merge branch 'lv-postbuild' into 'master'

Build & Bundling Refactors lv-sb

See merge request !25
parents e9e91c7c 2d26b94c
# Enable CPack packaging.
include(${LidarViewSuperBuild_SOURCE_DIR}/../Application/SoftwareInformation/branding.cmake)
# Crossplatform Bundling scripts for LidarView
#Sanitize checks
if(NOT package_suffix )
message(FATAL_ERROR "package_suffix not set")
endif()
if(NOT SOFTWARE_NAME )
message(FATAL_ERROR "SOFTWARE_NAME branding not set")
endif()
if(NOT SOFTWARE_VENDOR )
message(FATAL_ERROR "SOFTWARE_VENDOR branding not set")
endif()
# Include CMake scripts for geting the version from Git
include("${LidarViewSuperBuild_SOURCE_DIR}/../LVCore/CMake/Git.cmake")
......@@ -26,6 +36,10 @@ include(${LidarViewSuperBuild_SOURCE_DIR}/lidarview-superbuild/Projects/getdate.
GET_DATE()
set(PACKAGE_TIMESTAMP "${GD_YEAR}${GD_MONTH}${GD_DAY}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${SOFTWARE_NAME}")
set(CPACK_PACKAGE_NAME "${SOFTWARE_NAME}")
set(CPACK_PACKAGE_SOFTWARE_VENDOR "${SOFTWARE_VENDOR}")
set(CPACK_COMPONENT_LIDARVIEW_DISPLAY_NAME ${SOFTWARE_NAME})
set(CPACK_PACKAGE_VERSION_MAJOR ${LV_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${LV_VERSION_MINOR})
......@@ -160,4 +174,4 @@ if (qt5_enabled)
superbuild_install_qt5_plugin_paths(qt5_plugin_paths ${qt5_plugins})
else ()
set(qt5_plugin_paths)
endif ()
\ No newline at end of file
endif ()
# Bundling scripts for LidarView - Apple Specific
# Some advices when debugging:
# - get help by looking at:
# (mainly) https://gitlab.kitware.com/paraview/paraview-superbuild/blob/master/projects/apple/paraview.bundle.cmake
......@@ -19,7 +21,10 @@
# to print/modify/add paths, then get rid of your hack using only this file
# (we do not want to modify the common-superbuild)
include(${LidarViewSuperBuild_SOURCE_DIR}/../Application/SoftwareInformation/branding.cmake)
#Sanitize checks
if(NOT SOFTWARE_NAME )
message(FATAL_ERROR "SOFTWARE_NAME branding not set")
endif()
# the variable lidarview_appname:
# - must be a valid dirname: will be a directory at the top of the .dmg
......@@ -144,7 +149,7 @@ foreach (qt5_plugin_path IN LISTS qt5_plugin_paths)
SEARCH_DIRECTORIES "${library_paths}")
endforeach ()
#LV already copies its calib, files but this is done to get VV specific ones too
install(DIRECTORY "${superbuild_install_location}/bin/${lidarview_appname}/Contents/Resources"
DESTINATION "${lidarview_appname}/Contents"
COMPONENT superbuild)
......
# Bundling scripts for LidarView - Unix Specific
set(library_paths "${superbuild_install_location}/lib")
if (Qt5_DIR)
......
# Bundling scripts for LidarView - Win32 Specific
# Set NSIS install specific stuff.
if (CMAKE_CL_64)
# Change default installation root path for Windows x64.
......@@ -97,6 +99,3 @@ install(FILES ${boost_bin_dll}
COMPONENT superbuild
)
unset(boost_bin_dll)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "bin")
include(InstallRequiredSystemLibraries)
\ No newline at end of file
cmake_minimum_required(VERSION 3.12)
#Sanitize checks
if(NOT SOFTWARE_NAME OR NOT SOFTWARE_VENDOR)
message(FATAL_ERROR "SOFTWARE_NAME or SOFTWARE_VENDOR branding not set")
endif()
project(LidarViewSuperBuild)
set (SuperBuild_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
set (SuperBuild_PROJECTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Projects")
......@@ -185,10 +190,12 @@ function (superbuild_add_packaging)
list(APPEND superbuild_export_variables
qt5_version)
# pass some variables that are required for packaging step:
list(APPEND superbuild_export_variables
PARAVIEW_VERSION
LV_BUILD_ARCHITECTURE
SOFTWARE_NAME
SOFTWARE_VENDOR
package_suffix
ENABLE_slam
)
......
superbuild_add_project(ceres
DEPENDS eigen glog
CMAKE_ARGS
-DCMAKE_CXX_STANDARD=11
-DCMAKE_CXX_STANDARD_REQUIRED=ON
......@@ -9,5 +9,4 @@ superbuild_add_project(ceres
-DBUILD_TESTING=OFF
-DBUILD_EXAMPLES=OFF
-DGFLAGS=OFF
-DEIGEN_INCLUDE_DIR_HINTS=<INSTALL_DIR>/include/eigen3
)
)
......@@ -6,4 +6,9 @@ superbuild_add_project(eigen
CMAKE_ARGS
-DEIGEN_BUILD_PKGCONFIG=OFF
-DBUILD_TESTING=OFF
)
)
superbuild_add_extra_cmake_args(
-DEIGEN_INCLUDE_DIR:PATH=<INSTALL_DIR>/include/eigen3
-DEIGEN3_DIR:PATH=<INSTALL_DIR>/share/eigen3/cmake
)
......@@ -4,8 +4,7 @@ superbuild_add_project(g2o
CMAKE_ARGS
-DG2O_BUILD_EXAMPLES=OFF
-DG2O_BUILD_APPS=OFF
-DEIGEN3_DIR=<INSTALL_DIR>/share/eigen3/cmake
-Dg2o_RUNTIME_OUTPUT_DIRECTORY=bin
-Dg2o_LIBRARY_OUTPUT_DIRECTORY=lib
-DCMAKE_INSTALL_RPATH=<INSTALL_DIR>/lib
)
)
......@@ -3,6 +3,8 @@
https://gitlab.kitware.com/paraview/paraview-superbuild/blob/c8006d9a96eaa06228a011bc8d646541106643ec/projects/las.cmake
]]
cmake_dependent_option(Boost_NO_BOOST_CMAKE "Boost_NO_BOOST_CMAKE" ON "NOT USE_SYSTEM_boost" OFF)
superbuild_add_project(liblas
DEPENDS boost
CMAKE_ARGS
......@@ -12,7 +14,8 @@ superbuild_add_project(liblas
-DWITH_LASZIP:BOOL=OFF
-DWITH_TESTS:BOOL=OFF
-DWITH_UTILITIES:BOOL=OFF
-DBoost_USE_STATIC_LIBS:BOOL=OFF)
-DBoost_NO_BOOST_CMAKE:BOOL=${Boost_NO_BOOST_CMAKE}
)
# this patch is commited upstream at 4dbc30a7e7e099cbe01a7c192ec19d231cc26894
superbuild_apply_patch(liblas respect-with-geotiff
......
set(pv_cmake_options "")
find_package(Protobuf)
if (Protobuf_FOUND)
if (Protobuf_FOUND AND NOT VTK_USE_SYSTEM_PROTOBUF)
message(MESSAGE "Found a system-wide Protobuf library, tell VTK to use it to avoid runtime version mismatch")
set(VTK_USE_SYSTEM_PROTOBUF ON CACHE BOOL "Tell paraview to use the system-wide Protobuf that CMake found, to avoid runtime version mismatch.")
list(APPEND pv_cmake_options "-DVTK_USE_SYSTEM_PROTOBUF:BOOL=${VTK_USE_SYSTEM_PROTOBUF}" )
......
......@@ -7,12 +7,10 @@ superbuild_add_project(pcl
-DPCL_ONLY_CORE_POINT_TYPES:BOOL=ON
-DBoost_NO_BOOST_CMAKE:BOOL=ON
-DBoost_USE_MULTITHREAD:BOOL=ON
-DBoost_USE_STATIC_LIBS:BOOL=OFF
-DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32:BOOL=ON
-DBOOST_LIBRARYDIR:PATH=<INSTALL_DIR>/lib
-DBoost_LIBRARY_DIR_DEBUG:PATH=<INSTALL_DIR>/lib
-DBoost_LIBRARY_DIR_RELEASE:PATH=<INSTALL_DIR>/lib
-DEIGEN_INCLUDE_DIR=<INSTALL_DIR>/include/eigen3
-DQHULL_LIBRARY:FILEPATH=<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}qhullstatic${CMAKE_STATIC_LIBRARY_SUFFIX}
-DQHULL_LIBRARY_DEBUG:FILEPATH=<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}qhullstatic${CMAKE_STATIC_LIBRARY_SUFFIX}
-DBUILD_visualization:BOOL=OFF
......@@ -32,9 +30,13 @@ superbuild_add_project(pcl
-DWITH_MPI:BOOL=OFF
-DWITH_CUDA:BOOL=OFF
-DWITH_DOCS:BOOL=OFF
)
)
superbuild_add_extra_cmake_args(
-DPCL_DIR:PATH=<INSTALL_DIR>/share/pcl-1.10
)
# If on Windows and using MSVC < 2017, remove constexpr declarations
if (WIN32 AND MSVC AND MSVC_VERSION VERSION_LESS 1910)
superbuild_apply_patch(pcl msvc2015-compatibility "Remove constexpr declarations for MSVC 2015 support")
endif ()
\ No newline at end of file
endif ()
......@@ -2,4 +2,8 @@ superbuild_add_project(yaml
CMAKE_ARGS
-DCMAKE_CXX_STANDARD=11
-DCMAKE_CXX_STANDARD_REQUIRED=ON
)
)
superbuild_add_extra_cmake_args(
-DYAML_DIR:PATH=<INSTALL_DIR>/include/yaml-cpp
)
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