Skip to content
Snippets Groups Projects
Commit 710ac9ff authored by Timothée Couble's avatar Timothée Couble
Browse files

Merge branch 'experimental/allowStandAloneBuilds' into 'master'

[refact] Refact LidarView build system to allow standalone builds

See merge request !169
parents cb606e8e e3b4704f
No related branches found
No related tags found
1 merge request!169[refact] Refact LidarView build system to allow standalone builds
Pipeline #329146 failed
# Sanitize checks
if(NOT LV_INSTALL_LIBRARY_DIR )
message(FATAL_ERROR "LV_INSTALL_LIBRARY_DIR not set")
endif()
if(NOT SOFTWARE_NAME OR NOT SOFTWARE_VENDOR)
message(FATAL_ERROR "SOFTWARE_NAME or SOFTWARE_VENDOR branding not set")
endif()
if(NOT LV_VERSION_FULL)
message(FATAL_ERROR "LV_VERSION_ variables not set")
endif()
if(NOT LV_BUILD_PLATFORM)
message(FATAL_ERROR "LV_BUILD_PLATFORM not set")
endif()
add_subdirectory("Ui/")
add_subdirectory(Ui/)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set (source_files
set(source_files
vvMainWindow.h
vvMainWindow.ui
vvResources.qrc
vvMainWindow.cxx
vvMainWindow.h
)
)
# Please make sure to adapt the AboutDialog text in the followin file
# Lidar\python\lidarview\aboutDialog.py
# You also need to change:
# - bottom_logo.png (bottom logo)
set(plugins_targets
ParaView::paraview_plugins
LidarView::lidarview_plugins
)
if (PARAVIEW_PLUGIN_ENABLE_LidarSlam)
list(APPEND plugins_targets LidarSlam::paraview_wrapping)
endif ()
paraview_client_add(
NAME ${SOFTWARE_NAME} #Name of the Target
NAMESPACE "LidarView"
VERSION ${LV_VERSION_FULL}
APPLICATION_NAME "${SOFTWARE_NAME}"
ORGANIZATION "${SOFTWARE_VENDOR}"
TITLE "${SOFTWARE_NAME} ${LV_VERSION_FULL} ${LV_BUILD_PLATFORM}"
SPLASH_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/SoftwareInformation/Splash.jpg"
BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/logo.icns"
APPLICATION_ICON "${CMAKE_CURRENT_SOURCE_DIR}/SoftwareInformation/logo.ico"
REQUIRED_PLUGINS LidarPlugin VelodynePlugin PythonQtPlugin
NAME LidarView
NAMESPACE "LidarView"
EXPORT "LidarViewClient"
VERSION ${LV_VERSION_FULL}
APPLICATION_NAME "LidarView"
ORGANIZATION "${SOFTWARE_VENDOR}"
TITLE "${SOFTWARE_NAME} ${LV_VERSION_FULL} ${LV_BUILD_PLATFORM}"
SPLASH_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/SoftwareInformation/Splash.jpg"
BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/logo.icns"
APPLICATION_ICON "${CMAKE_CURRENT_SOURCE_DIR}/SoftwareInformation/logo.ico"
PLUGINS_TARGETS ${plugins_targets}
REQUIRED_PLUGINS PythonQtPlugin LidarCorePlugin
MAIN_WINDOW_CLASS vvMainWindow
MAIN_WINDOW_INCLUDE vvMainWindow.h
......@@ -50,9 +55,9 @@ paraview_client_add(
APPLICATION_XMLS
${CMAKE_CURRENT_SOURCE_DIR}/lqSources.xml
${CMAKE_CURRENT_SOURCE_DIR}/lqFilters.xml
RUNTIME_DESTINATION ${LV_INSTALL_RUNTIME_DIR}
LIBRARY_DESTINATION ${LV_INSTALL_LIBRARY_DIR}
RUNTIME_DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY_DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
target_include_directories(${SOFTWARE_NAME} PUBLIC
......@@ -63,7 +68,7 @@ target_include_directories(${SOFTWARE_NAME} PUBLIC
target_link_libraries(${SOFTWARE_NAME} PUBLIC
lqApplicationComponents #actually LVCore/ApplicationComponents
ApplicationUi
)
)
# Bundle Icon on Apple
if(APPLE)
......
# Sanitize checks
if(NOT LV_INSTALL_LIBRARY_DIR )
message(FATAL_ERROR "LV_INSTALL_LIBRARY_DIR not set")
endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
......@@ -64,8 +59,8 @@ target_include_directories(ApplicationUi PUBLIC
target_compile_definitions(ApplicationUi
PRIVATE
"LIDARVIEW_BUILD_VELODYNE=$<BOOL:${LIDARVIEW_BUILD_VELODYNE}>"
"LIDARVIEW_BUILD_HESAI=$<BOOL:${LIDARVIEW_BUILD_HESAI}>"
"LIDARVIEW_BUILD_VELODYNE=$<BOOL:${PARAVIEW_PLUGIN_ENABLE_VelodynePlugin}>"
"LIDARVIEW_BUILD_HESAI=$<BOOL:${PARAVIEW_PLUGIN_ENABLE_HesaiPlugin}>"
)
include(GenerateExportHeader)
......@@ -74,8 +69,8 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/applicationui_export.h DESTINATION ${L
# Install Library needed
install(TARGETS ApplicationUi
RUNTIME DESTINATION ${LV_INSTALL_RUNTIME_DIR}
LIBRARY DESTINATION ${LV_INSTALL_LIBRARY_DIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
#-----------------------------------------------------------------------------
......
......@@ -2,4 +2,10 @@ include(PythonModuleInstaller)
python_module_install(
NAME lidarview
PATH ${CMAKE_CURRENT_LIST_DIR}/lidarview)
FILES
lidarview/__init__.py
lidarview/aboutDialog.py
lidarview/applogic.py
lidarview/gridAdjustmentDialog.py
lidarview/planefit.py
)
#========================================================================
# COMMON LIDARVIEW OPTIONS
#========================================================================
include(CommonLidarViewOptions)
#========================================================================
# OBSOLETE PLUGIN OPTIONS
#========================================================================
lidarview_deprecated_setting(velodyne_interpreter
PARAVIEW_ENABLE_PLUGIN_VelodynePlugin LIDARVIEW_BUILD_VELODYNE "ON")
set(PARAVIEW_PLUGIN_ENABLE_VelodynePlugin "${velodyne_interpreter}" CACHE BOOL "")
lidarview_deprecated_setting(hesai_interpreter
PARAVIEW_ENABLE_PLUGIN_HesaiPlugin LIDARVIEW_BUILD_HESAI "OFF")
set(PARAVIEW_PLUGIN_ENABLE_HesaiPlugin "${hesai_interpreter}" CACHE BOOL "")
# Every Brand related names / resource paths should be declared here
# Software Name / Vendor
set(SOFTWARE_NAME "LidarView")
set(SOFTWARE_NAME "LidarView")
set(SOFTWARE_VENDOR "Kitware")
set(SOFTWARE_TARGET "LidarView::LidarView")
# Software LOGO / ICON # Must be absolute to be used by packaging
set(SOFTWARE_ICON_PATH "${CMAKE_CURRENT_LIST_DIR}/SoftwareInformation/logo.ico")
......
cmake_minimum_required(VERSION 3.20.3 FATAL_ERROR)
project(LidarView)
#Thanks to ExternalProject CMAKE_SOURCE_DIR will correctly be the same as this PROJECT_SOURCE_DIR
# add path to get all the needed modules used to config Lidarview
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/LVCore/CMake")
# Add path to get all the needed modules used to config Lidarview
set(lidarview_cmake_dir "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
set(lvcore_cmake_dir "${CMAKE_CURRENT_SOURCE_DIR}/LVCore/CMake")
if (NOT IS_DIRECTORY "${lvcore_cmake_dir}")
message(FATAL_ERROR
"Failed to find the LVCore CMake directory. Did you forget to initialize the "
"submodule? (git submodule update --init --recursive)")
endif ()
list(APPEND CMAKE_MODULE_PATH
"${lidarview_cmake_dir}"
"${lvcore_cmake_dir}")
# Include branding.cmake
include(Application/branding.cmake)
include(SetBranding)
include(LidarViewSupportMacros)
include(LidarViewOptions)
# we include the module that allow us to configure the Lidarview project
include(SetupLidarviewProject)
# custom code here
if(LIDARVIEW_BUILD_VELODYNE)
add_subdirectory(Plugins/VelodynePlugin)
endif()
if(LIDARVIEW_BUILD_HESAI)
add_subdirectory(Plugins/HesaiPlugin)
endif()
# Add plugins to be searched by default in LVCore CMakeLists.txt
set(lidarview_default_plugins
VelodynePlugin
HesaiPlugin)
set(lidarview_plugin_directories
"${CMAKE_CURRENT_SOURCE_DIR}/Plugins")
add_subdirectory(LVCore)
# Application
add_subdirectory(Application)
# Must be invoked Last
include(FinalizeLidarViewProject)
Subproject commit 86202bc0cf5583d3488bf9f1dceee62fbff7f3d4
Subproject commit 54c3b12ab00623acde21af8f7292a2600c51370c
Subproject commit faf5b2aab5652ca4fd18cc1d422290c161699f7f
Subproject commit 7989e2af6e90b1d512fc32b5685bd661c3005e66
Subproject commit 40861fdadc953cf5f5be132aa3e84a6e093c7002
Subproject commit 54e610298b6efa09239919ad48fcd3ae9e7d5c11
Subproject commit 3651711a872ecfe2d87a17966ba62cecd29a0467
Subproject commit d7643e830166620cce0b2ae6079da90b7060304e
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