mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 01:23:24 -08:00
Embed bundled resources without compiling large C++ arrays [skip ci] (#7730)
This commit is contained in:
parent
7ca697348b
commit
67330ead5a
1 changed files with 10 additions and 1 deletions
|
|
@ -495,7 +495,15 @@ if(APPLE)
|
||||||
set(cockatrice_SOURCES ${cockatrice_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
|
set(cockatrice_SOURCES ${cockatrice_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
qt_add_resources(cockatrice_RESOURCES_RCC ${cockatrice_RESOURCES})
|
# The fonts and card artwork produce a large C++ byte array with qt_add_resources.
|
||||||
|
# Embed the data in the compiled resource object instead, keeping compiler memory
|
||||||
|
# independent of that payload. Qt's two-pass resource build is unsupported on iOS.
|
||||||
|
if(IOS)
|
||||||
|
qt_add_resources(cockatrice_RESOURCES_RCC ${cockatrice_RESOURCES})
|
||||||
|
else()
|
||||||
|
qt_add_big_resources(cockatrice_RESOURCES_RCC ${cockatrice_RESOURCES})
|
||||||
|
endif()
|
||||||
|
set_source_files_properties(${cockatrice_RESOURCES} PROPERTIES SKIP_AUTORCC ON)
|
||||||
|
|
||||||
# Declare path variables
|
# Declare path variables
|
||||||
set(ICONDIR
|
set(ICONDIR
|
||||||
|
|
@ -521,6 +529,7 @@ qt_add_executable(
|
||||||
WIN32
|
WIN32
|
||||||
MACOSX_BUNDLE
|
MACOSX_BUNDLE
|
||||||
${cockatrice_SOURCES}
|
${cockatrice_SOURCES}
|
||||||
|
${cockatrice_RESOURCES}
|
||||||
${cockatrice_RESOURCES_RCC}
|
${cockatrice_RESOURCES_RCC}
|
||||||
${cockatrice_MOC_SRCS}
|
${cockatrice_MOC_SRCS}
|
||||||
MANUAL_FINALIZATION
|
MANUAL_FINALIZATION
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue