Skip to content

Commit

Permalink
Install GL lib to obs_glcapture subdir
Browse files Browse the repository at this point in the history
It will be available inside scout runtime this way.

Closes #191
  • Loading branch information
nowrep committed Dec 29, 2023
1 parent 31c7bc4 commit 0b23e32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ install(TARGETS VkLayer_obs_vkcapture
LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}")

install(TARGETS obs_glcapture
LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}")
LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/obs_glcapture")

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/obs_vkcapture${LAYER_SUFFIX}.json
DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/vulkan/implicit_layer.d")
Expand Down
12 changes: 2 additions & 10 deletions src/obs-gamecapture.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,8 @@ if [ "$#" -eq 0 ]; then
exit 1
fi

OBS_GLCAPTURE_LIBDIR="@CMAKE_INSTALL_PREFIX@/\$LIB"
OBS_GLCAPTURE_LIB="libobs_glcapture.so"
OBS_GLCAPTURE_LIB="@CMAKE_INSTALL_PREFIX@/\$LIB/obs_glcapture/libobs_glcapture.so"

if [ -n "${LD_LIBRARY_PATH}" ]; then
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${OBS_GLCAPTURE_LIBDIR}"
OBS_GLCAPTURE_PRELOAD="${OBS_GLCAPTURE_LIB}"
else
OBS_GLCAPTURE_PRELOAD="${OBS_GLCAPTURE_LIBDIR}/${OBS_GLCAPTURE_LIB}"
fi

exec env LD_PRELOAD="${LD_PRELOAD}${LD_PRELOAD:+:}${OBS_GLCAPTURE_PRELOAD}" \
exec env LD_PRELOAD="${LD_PRELOAD}${LD_PRELOAD:+:}${OBS_GLCAPTURE_LIB}" \
OBS_VKCAPTURE=1 \
"$@"

0 comments on commit 0b23e32

Please sign in to comment.