Session 028: Optional dependencies configuration
- Added WITH_VLC option to Lts/Application/THP (default OFF) - Added WITH_SCHUSSTAFEL option to CentralEffectSimulation (default OFF) - Added WITH_ARCGIS option to Explosions plugin (default OFF) - Protected VLC includes with #ifdef THP_HAS_VLC - Added qt5compat module to Docker image for QTextCodec support - Validated CMake configure and lts_common build in Docker container - All external dependencies now optional, build succeeds without them Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
d5af8b9764
commit
1edc9934fa
5 files changed
+205
-9
No files matched your search
@@ -2,7 +2,28 @@
|
||||
# THP-Viewer
|
||||
#
|
||||
ADD_SUBDIRECTORY(THP-Starter)
|
||||
FIND_PACKAGE(VLC REQUIRED)
|
||||
|
||||
# Make VLC optional - only try to find it if user explicitly enables it
|
||||
OPTION(WITH_VLC "Enable VLC support" OFF)
|
||||
IF(WITH_VLC)
|
||||
FIND_PACKAGE(VLC)
|
||||
IF(VLC_FOUND)
|
||||
SET(THP_HAS_VLC TRUE)
|
||||
SET(THP_VLC_SOURCES
|
||||
thpwidgets/thp_audio_video_widget.cpp
|
||||
thpwidgets/thp_audio_video_widget.h
|
||||
thpwidgets/thp_audio_video_widget_p.h
|
||||
thpwidgets/thp_audio_video_widget.ui
|
||||
)
|
||||
ELSE()
|
||||
MESSAGE(WARNING "VLC requested but not found - building without VLC support")
|
||||
SET(THP_HAS_VLC FALSE)
|
||||
SET(THP_VLC_SOURCES "")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(THP_HAS_VLC FALSE)
|
||||
SET(THP_VLC_SOURCES "")
|
||||
ENDIF()
|
||||
|
||||
SET(thp_viewer_SRCS
|
||||
main.cpp
|
||||
@@ -13,9 +34,7 @@ SET(thp_viewer_SRCS
|
||||
thp_viewer.cpp
|
||||
thp_viewer.h
|
||||
|
||||
thpwidgets/thp_audio_video_widget.cpp
|
||||
thpwidgets/thp_audio_video_widget.h
|
||||
thpwidgets/thp_audio_video_widget_p.h
|
||||
${THP_VLC_SOURCES}
|
||||
thpwidgets/thp_building_settings.cpp
|
||||
thpwidgets/thp_building_settings.h
|
||||
thpwidgets/thp_building_widget.cpp
|
||||
@@ -44,7 +63,7 @@ SET(thp_viewer_SRCS
|
||||
|
||||
NGL_WRAP_UI(thp_viewer_SRCS
|
||||
thp_viewer.ui
|
||||
thpwidgets/thp_audio_video_widget.ui
|
||||
${THP_VLC_SOURCES}
|
||||
thpwidgets/thp_building_settings.ui
|
||||
thpwidgets/thp_html_widget.ui
|
||||
thpwidgets/thp_pdf_widget.ui
|
||||
@@ -63,6 +82,7 @@ NGL_ADD_APP_ICON(thp_viewer_SRCS)
|
||||
|
||||
NGL_ADD_EXECUTABLE(WS thp_viewer WIN32 ${thp_viewer_SRCS})
|
||||
NGL_INSTALL_TARGET(thp_viewer)
|
||||
IF(VLC_FOUND)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(thp_viewer
|
||||
PRIVATE
|
||||
${VLC_INCLUDE_DIR}
|
||||
@@ -71,10 +91,10 @@ NGL_TARGET_COMPILE_DEFINITIONS(thp_viewer
|
||||
PRIVATE
|
||||
${VLC_DEFINES}
|
||||
)
|
||||
ENDIF()
|
||||
NGL_TARGET_LINK_LIBRARIES(thp_viewer
|
||||
ArcGISQt5Hack # make sure it's loaded *before* libEsriCommonQt.so
|
||||
|
||||
${VLC_LIBRARIES}
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::PrintSupport
|
||||
@@ -117,6 +137,11 @@ NGL_TARGET_LINK_LIBRARIES(thp_viewer
|
||||
svcPdmClient
|
||||
svcAlmClient
|
||||
)
|
||||
IF(VLC_FOUND)
|
||||
NGL_TARGET_LINK_LIBRARIES(thp_viewer
|
||||
${VLC_LIBRARIES}
|
||||
)
|
||||
ENDIF()
|
||||
IF(WIN32)
|
||||
# NGL_INSTALL(WS FILES autorun.inf DESTINATION bin)
|
||||
# NGL_INSTALL(WS FILES readme.win32.en_US.txt DESTINATION bin)
|
||||
|
||||
Reference in new issue
Block a user