shinchiro/mpv-winbuild-cmake

vulkan: rebase patch - missing one file

Closed this issue · 2 comments

Hi zhongfly and shinchiro,

The current vulkan patch is missing one file or step.

The generated vulkan.pc is like this

prefix=/home/cm/mpv-winbuild-cmake/build64/install/mingw
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Vulkan-Loader
Description: Vulkan Loader
Version: 1.3.235
Libs: -L${libdir} -lvulkan
-lshlwapi -lcfgmgr32
Cflags: -I${includedir}

The line has the problem

-lshlwapi -lcfgmgr32

If we build everything from the ground up, the build step of mpv will fail due to vulkan.pc.

Regards,

Possible solution:
replace

+ set(PRIVATE_LIBS "${PRIVATE_LIBS} -lshlwapi -lcfgmgr32")

with

+    if("${PRIVATE_LIBS}" STREQUAL "")
+        set(PRIVATE_LIBS "Libs.private: -lshlwapi -lcfgmgr32")
+    else()
+        set(PRIVATE_LIBS "${PRIVATE_LIBS} -lshlwapi -lcfgmgr32")
+    endif()

You can creat a pr for this