Skip to content

Commit

Permalink
CMake: Minor Video Cmake Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Sep 20, 2024
1 parent 8ad91d9 commit 729ac88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
8 changes: 7 additions & 1 deletion cmake/FindGStreamer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ if(WIN32)
else()
set(GSTREAMER_PREFIX "C:/gstreamer/1.0/msvc_x86_64")
endif()
set(PKG_CONFIG_EXECUTABLE ${GSTREAMER_PREFIX}/bin/pkg-config.exe)
find_program(PKG_CONFIG_PROGRAM pkg-config PATHS ${GSTREAMER_PREFIX}/bin)
set(PKG_CONFIG_EXECUTABLE ${PKG_CONFIG_PROGRAM})
set(ENV{PKG_CONFIG_PATH} "${GSTREAMER_PREFIX}/lib/pkgconfig;${GSTREAMER_PREFIX}/lib/gstreamer-1.0/pkgconfig;$ENV{PKG_CONFIG_PATH}")
# cmake_path(CONVERT "${GSTREAMER_PREFIX}/lib/pkgconfig;${GSTREAMER_PREFIX}/lib/gstreamer-1.0/pkgconfig;$ENV{PKG_CONFIG_PATH}" TO_NATIVE_PATH_LIST PKG_CONFIG_PATH NORMALIZE)
# cmake_print_variables(PKG_CONFIG_PATH)
Expand Down Expand Up @@ -116,6 +117,11 @@ elseif(ANDROID)
--define-variable=includedir=${GSTREAMER_PREFIX}/include
)
cmake_print_variables(PKG_CONFIG_ARGN)

if(CMAKE_HOST_WIN32)
find_program(PKG_CONFIG_PROGRAM pkg-config PATHS ${GSTREAMER_PREFIX}/share/gst-android/ndk-build/tools/windows)
set(PKG_CONFIG_EXECUTABLE ${PKG_CONFIG_PROGRAM})
endif()
endif()
cmake_print_variables(GSTREAMER_PREFIX)
list(PREPEND CMAKE_PREFIX_PATH ${GSTREAMER_PREFIX})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ if(NOT GST_PLUGINS_FOUND)
${GSTREAMER_PREFIX}/Versions/Current/lib
${GSTREAMER_PREFIX}/Versions/Current/lib/gstreamer-1.0
)
cmake_print_variables(GStreamer_${plugin}_LIBRARY)
if(GStreamer_${plugin}_LIBRARY)
cmake_print_variables(GStreamer_${plugin}_LIBRARY)
target_link_libraries(gstqml6gl PUBLIC ${GStreamer_${plugin}_LIBRARY})
if(WIN32)
# install(FILES ${GStreamer_${plugin}_LIBRARY} DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down Expand Up @@ -305,20 +305,3 @@ if(WIN32)
file(GLOB GST_WIN_PLUGINS ${GST_WIN_PLUGINS_PATH})
install(FILES ${GST_WIN_PLUGINS} DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

# if(ANDROID)
# configure_file(
# ${GSTREAMER_PREFIX}/share/gst-android/ndk-build/gstreamer_android-1.0.c.in
# ${CMAKE_BINARY_DIR}/gstreamer_android-1.0.c
# @ONLY
# )
# target_sources(gstqml6gl PRIVATE ${CMAKE_BINARY_DIR}/gstreamer_android-1.0.c)
# install(
# DIRECTORY ${GSTREAMER_PREFIX}/share/gst-android/ndk-build/androidmedia
# DESTINATION ${CMAKE_SOURCE_DIR}/android/src/org/freedesktop/gstreamer/androidmedia
# )
# install(
# FILES ${GSTREAMER_PREFIX}/share/gst-android/ndk-build/GStreamer.java
# DESTINATION ${CMAKE_SOURCE_DIR}/android/src/org/freedesktop/gstreamer/androidmedia/GStreamer.java
# )
# endif()

0 comments on commit 729ac88

Please sign in to comment.