Rebasing modified CMake-files to fetch and link GStreamer

This commit is contained in:
nissebergman
2022-06-21 18:23:02 +02:00
committed by GPayne
parent f3ec877f2a
commit e9148a9bbd
4 changed files with 17 additions and 4 deletions

4
.gitmodules vendored
View File

@@ -16,7 +16,9 @@
branch = OpenSpace
[submodule "apps/OpenSpace/ext/sgct"]
path = apps/OpenSpace/ext/sgct
url = https://github.com/sgct/sgct
# url = https://github.com/sgct/sgct
url = https://github.com/nissebergman/sgct.git
branch = gstreamer-functionality
[submodule "modules/fitsfilereader/ext/CCfits"]
path = modules/fitsfilereader/ext/CCfits
url = https://github.com/OpenSpace/CCfits.git

View File

@@ -42,6 +42,7 @@ if (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8)
message(FATAL_ERROR "OpenSpace can only be generated for 64 bit architectures.")
endif ()
##########################################################################################
# Cleanup project #
##########################################################################################
@@ -242,6 +243,7 @@ endif ()
# Misc settings #
##########################################################################################
# Manage the CPack packaging
include(${PROJECT_SOURCE_DIR}/support/cmake/packaging.cmake)

View File

@@ -40,9 +40,6 @@ file(GLOB app_dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_D
list(REMOVE_ITEM app_dirs ".DS_Store")
list(REMOVE_ITEM app_dirs "CMakeLists.txt")
message(STATUS "Enabled applications:")
foreach (app ${app_dirs})
string(TOUPPER ${app} upper_app)

View File

@@ -195,3 +195,15 @@ if (WIN32)
COMMAND_EXPAND_LISTS
)
endif ()
# Handles dll copying and library linking for GStreamer functionality.
if(SGCT_GSTREAMER_SUPPORT)
include(${OPENSPACE_BASE_DIR}/apps/OpenSpace/ext/sgct/ext/gstreamer/copy_gstreamer_libs.cmake)
copy_gstreamer_dlls(OpenSpace)
link_gstreamer_libs(OpenSpace)
target_compile_definitions(OpenSpace PUBLIC
$<$<BOOL:${SGCT_GSTREAMER_SUPPORT}>:SGCT_HAS_GSTREAMER>
"OPENSPACE_ROOT=\"${PROJECT_SOURCE_DIR}\"" # Path variable to be picked up in the GStreamer C++
)
endif()