Commit f1d73155 authored by Jerome Dias's avatar Jerome Dias
Browse files

Merge branch 'upgrade/Paraview56Python37' into 'master'

Upgrade/paraview56 python37

See merge request !21
parents 71290a03 c462ae9a
cmake_minimum_required(VERSION 2.8.8)
cmake_minimum_required(VERSION 3.12)
project(LidarViewSuperBuild)
set (SuperBuild_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
......@@ -27,7 +27,7 @@ macro (superbuild_setup_variables)
# endif()
# superbuild_set_version_variables(paraview "${paraview_default_version}" "paraview-version.cmake" "version.txt")
# set(paraview_version "${paraview_version_major}.${paraview_version_minor}")
set(paraview_version "5.4")
set(paraview_version "5.6")
endmacro ()
#------------------------------------------------------------------------------
# Set a default build type if none was specified
......@@ -44,14 +44,14 @@ endif()
include(CheckTypeSize)
check_type_size(void* VOID_PTR_SIZE BUILTIN_TYPES_ONLY)
if (VOID_PTR_SIZE EQUAL 8)
set(VV_BUILD_ARCHITECTURE "64")
set(LV_BUILD_ARCHITECTURE "64")
else ()
set(VV_BUILD_ARCHITECTURE "32")
set(LV_BUILD_ARCHITECTURE "32")
endif()
# Set suffix to be used for generating archives. This ensures that the package
# files have decent names that we can directly upload to the website.
set (package_suffix "${CMAKE_SYSTEM_NAME}-${VV_BUILD_ARCHITECTURE}bit")
set (package_suffix "${CMAKE_SYSTEM_NAME}-${LV_BUILD_ARCHITECTURE}bit")
#-----------------------------------------------------------------------------
# Setup CMAKE_MODULE_PATH so that platform specific configurations are processed
......@@ -66,19 +66,20 @@ set (CMAKE_MODULE_PATH
function (superbuild_find_projects var)
# Some of these allow using system libraries.
set(projects
cxx11
paraview
python
python3
qt5
pythonqt
boost
bzip2
cxx11
eigen
liblas
freetype
opencv
paraview
pcap
png
python
pythonqt
qt5
zlib
ceres
glog
......@@ -94,12 +95,14 @@ function (superbuild_find_projects var)
if (UNIX)
list(APPEND projects
libxml2
ffi
)
if (NOT APPLE)
list(APPEND projects
fontconfig
gperf
utillinux
)
endif()
endif()
......@@ -126,10 +129,31 @@ if (WIN32)
endif()
endif()
if(UNIX AND NOT DEFINED USE_SYSTEM_python)
# it is still possible to pass -DUSE_SYSTEM_python=False to cmake
message(STATUS "Defaulting USE_SYSTEM_python to True (was undefined and we are on UNIX)")
set(USE_SYSTEM_python True CACHE BOOL INTERNAL)
if(UNIX)
# The following variable is used to define if python libs have to be used from the system
# directory (USE_SYSTEM_python3=True) or shipped in install dir (USE_SYSTEM_python3=False)
# this behavior is managed by the superbuild python install functions
if(NOT DEFINED USE_SYSTEM_python3)
# it is still possible to pass -DUSE_SYSTEM_python3=False to cmake
message(STATUS "Defaulting USE_SYSTEM_python3 to True (was undefined and we are on UNIX)")
set(USE_SYSTEM_python3 True CACHE BOOL INTERNAL)
endif()
# This is needed to ensure the superbuild projects to use the same python version.
# We force python to version 3.7 as it is the only one that has been tested
find_package(Python3 3.7 EXACT QUIET REQUIRED COMPONENTS Interpreter Development)
# By setting the following variables we specify a python version for FindPythonLibs
# (See cmake FindPythonLibs documentation)
set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
set(PYTHON_INCLUDE_DIR ${Python3_INCLUDE_DIRS})
set(PYTHON_LIBRARY ${Python3_LIBRARIES})
# Python3_INCLUDE_DIR and Python3_LIBRARY are Artefacts in FindPython3
# Both can be used to specific a python version
# (See cmake FindPython3 documentations)
set(Python3_INCLUDE_DIR ${Python3_INCLUDE_DIRS})
set(Python3_LIBRARY ${Python3_LIBRARIES})
endif()
function (superbuild_add_packaging)
......@@ -147,10 +171,17 @@ function (superbuild_add_packaging)
endif ()
list(GET generators 0 default_generator)
if (USE_SYSTEM_qt5)
if (qt5_enabled AND (USE_SYSTEM_qt5 OR APPLE OR WIN32))
list(APPEND superbuild_export_variables
Qt5_DIR)
find_package(Qt5 QUIET REQUIRED COMPONENTS Core)
set(qt5_version "${Qt5Core_VERSION_MAJOR}.${Qt5Core_VERSION_MINOR}")
else ()
set(qt5_version "${qt5_SOURCE_SELECTION}")
endif ()
list(APPEND superbuild_export_variables
qt5_version)
# pass some variables that are required for packaging step:
list(APPEND superbuild_export_variables
......@@ -210,6 +241,9 @@ list(APPEND superbuild_project_roots
set(_superbuild_default_cxx11 ON)
# set the default for qt5 to be 5.10
set(_superbuild_qt5_default_selection "5.10")
option(ENABLE_all "Enable all optional dependancy like pcl, ceres, opencv, darknet, ..." OFF)
if (ENABLE_all)
set(ENABLE_opencv ON CACHE BOOL "enable OpenCV")
......
......@@ -6,7 +6,7 @@ if (Protobuf_FOUND)
list(APPEND pv_cmake_options "-DVTK_USE_SYSTEM_PROTOBUF:BOOL=${VTK_USE_SYSTEM_PROTOBUF}" )
endif()
superbuild_add_project(paraview
DEPENDS qt5 python pythonqt
DEPENDS qt5 python python3 pythonqt
DEFAULT_ON
DEBUGGABLE
CMAKE_ARGS
......@@ -74,7 +74,7 @@ superbuild_add_project(paraview
#-DPYTHONQT_INCLUDE_DIR:PATH=<INSTALL_DIR>/include/PythonQt
#-DPYTHONQT_LIBRARY:PATH=<INSTALL_DIR>/lib/libPythonQt.so
-DModule_vtklibproj4:BOOL=ON
-DModule_vtklibproj:BOOL=ON
# beginning of modules required when opening a .series
-DModule_vtkIOAMR:BOOL=ON
......@@ -85,6 +85,11 @@ superbuild_add_project(paraview
-DModule_vtkIOVPIC:BOOL=ON
# end of modules required when opening a .series
# beginning of modules required when making python plugins with numpy array
-DModule_vtkPVPythonAlgorithm:BOOL=ON
-DModule_vtkFiltersVerdict:BOOL=ON
# end of modules required when making python plugins with numpy array
-DPQWIDGETS_DISABLE_QTWEBKIT:BOOL=ON
# specify the apple app install prefix. No harm in specifying it for all
......
superbuild_add_project(pythonqt
DEPENDS qt5 python
DEPENDS qt5 python python3
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=ON
-DPythonQt_QT_VERSION:STRING=${qt_version}
......@@ -11,4 +11,4 @@ superbuild_add_project(pythonqt
# specify the apple app install prefix. No harm in specifying it for all
# platforms.
-DMACOSX_APP_INSTALL_PREFIX:PATH=<INSTALL_DIR>/Applications
)
)
\ No newline at end of file
# Only needed on OSX
# boost libs are missing when we try to launch lidarview app and tests. Even
# if all the needed cmake flags are used for lidarview to managed
# dependencies with RPATH, it remains an issue where RPATH are not used
# to find boost libs. This script has been created to force lidarview to
# search all boost dependencies along RPATH. (See related issue
# here https://gitlab.kitware.com/cmake/cmake/-/issues/19315).
# This script change paths for all boost dependencies from libboost_* to @rpath/libboost_*
# get a list of all boost lib used
file(GLOB boost_libs LIST_DIRECTORIES false "${install_location}/lib/libboost*.dylib")
# get all app and tests on which to change boost path
file(GLOB app_list LIST_DIRECTORIES false "${install_location}/bin/*/Contents/MacOS/*")
file(GLOB lib_list LIST_DIRECTORIES false "lib/*.dylib" "${install_location}/lib/*.dylib")
file(GLOB test_list LIST_DIRECTORIES false "bin/Test*")
foreach (boost_lib IN LISTS boost_libs)
get_filename_component(libboost_name "${boost_lib}" NAME)
foreach (app_name IN LISTS app_list)
execute_process(
COMMAND install_name_tool
-change "${libboost_name}" "@rpath/${libboost_name}"
"${app_name}")
endforeach ()
foreach (lib_name IN LISTS lib_list)
execute_process(
COMMAND install_name_tool
-change "${libboost_name}" "@rpath/${libboost_name}"
"${lib_name}")
endforeach ()
foreach (test_name IN LISTS test_list)
execute_process(
COMMAND install_name_tool
-change "${libboost_name}" "@rpath/${libboost_name}"
"${test_name}")
endforeach ()
endforeach ()
Subproject commit 5d6ed8a9dba2ec0ee5737032f3aa230a177ca608
Subproject commit d6cbbd6890bb45da6aa7f9068b37c2383f6f5b38
......@@ -11,13 +11,13 @@
# endif()
superbuild_set_revision(pythonqt
GIT_REPOSITORY http://github.com/commontk/PythonQt.git
GIT_REPOSITORY https://gitlab.kitware.com/LidarView/pythonqt.git
GIT_TAG patched-8)
set(PARAVIEW_VERSION 5.4)
set(PARAVIEW_VERSION 5.6)
superbuild_set_revision(paraview
GIT_REPOSITORY https://gitlab.kitware.com/bjacquet/paraview.git
GIT_TAG origin/5.4CustomForLidarView)
GIT_TAG origin/5.6.1CustomForLidarView)
if (WIN32)
superbuild_set_revision(pcap
......
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