Skip to content

Commit

Permalink
Make FindFFMPEG understand that pc files can have no Libs.private sec…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
m-kuhn committed Jul 9, 2024
1 parent 12c3ed9 commit 983d736
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ jobs:
path: |
C:/src/**/*.log
- name: Fix openh264 linking
run: |
sed -i 's/ openh264\.lib //g' /c/builddir/build.ninja
- name: 🌋 Build
run: |
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --config ${{ env.BUILD_TYPE }}
Expand Down
1 change: 1 addition & 0 deletions vcpkg/ports/qtmultimedia/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set(${PORT}_PATCHES
static_find_modules.patch
fix_avfoundation_target.patch
remove-static-ssl-stub.patch
private_libs.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down
19 changes: 19 additions & 0 deletions vcpkg/ports/qtmultimedia/private_libs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake
index 6316dde..54f807b 100644
--- a/cmake/FindFFmpeg.cmake
+++ b/cmake/FindFFmpeg.cmake
@@ -264,9 +264,11 @@ function(__ffmpeg_internal_set_dependencies _component)
string(REGEX MATCHALL "${prefix_l}[^ ]+" libs_dependency ${out})
string(REGEX MATCHALL "[^ ]+${suffix_lib}" libs_dependency_lib ${out})

- string(REGEX REPLACE ".*Libs.private:([^\n\r]+).*" "\\1" out "${pcfile}")
- string(REGEX MATCHALL "${prefix_l}[^ ]+" libs_private_dependency ${out})
- string(REGEX MATCHALL "[^ ]+${suffix_lib}" libs_private_dependency_lib ${out})
+ if(out MATCHES "Libs.private:")
+ string(REGEX REPLACE ".*Libs.private:([^\n\r]+).*" "\\1" out "${pcfile}")
+ string(REGEX MATCHALL "${prefix_l}[^ ]+" libs_private_dependency ${out})
+ string(REGEX MATCHALL "[^ ]+${suffix_lib}" libs_private_dependency_lib ${out})
+ endif()

list(APPEND deps_no_suffix ${libs_dependency} ${libs_private_dependency})
foreach(dependency ${deps_no_suffix})

0 comments on commit 983d736

Please sign in to comment.