Skip to content

Commit

Permalink
Qt: Run macdeployqt twice
Browse files Browse the repository at this point in the history
Run macdeployqt twice. This seems silly, but since we don't have a direct reference to QtSvg,
it doesn't deployed directly from the main binary (only indirectly from iconengines), and
the libqsvg.dylib imageformat plugin does not get deployed. The second time round, the Svg
module is found, and thus imageformats gets deployed.

Fixes controller images not being displayed in Mac builds.
  • Loading branch information
stenzek committed Dec 25, 2023
1 parent f43255a commit b5f2b14
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pcsx2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1328,9 +1328,14 @@ function(setup_main_executable target)
set(postprocessBundleType ALL)
endif()

# Run macdeployqt twice. This seems silly, but since we don't have a direct reference to QtSvg,
# it doesn't deployed directly from the main binary (only indirectly from iconengines), and
# the libqsvg.dylib imageformat plugin does not get deployed. The second time round, the Svg
# module is found, and thus imageformats gets deployed.
find_program(MACDEPLOYQT_EXE macdeployqt HINTS "${QT_BINARY_DIRECTORY}")
add_custom_target(pcsx2-postprocess-bundle ${postprocessBundleType}
COMMAND "${MACDEPLOYQT_EXE}" "$<TARGET_FILE_DIR:${target}>/../.." -no-strip
COMMAND "${MACDEPLOYQT_EXE}" "$<TARGET_FILE_DIR:${target}>/../.." -no-strip
)
add_dependencies(pcsx2-postprocess-bundle ${target})
endif()
Expand Down

0 comments on commit b5f2b14

Please sign in to comment.