CMake: Fix storyboard copying

This commit is contained in:
TellowKrinkle 2023-04-29 16:10:38 -05:00
parent d95a85212f
commit f92dde26a3
1 changed files with 2 additions and 4 deletions

View File

@ -47,14 +47,12 @@ if (${IBTOOL} STREQUAL "IBTOOL-NOTFOUND")
endif()
foreach(sb ${STORYBOARDS})
set(output ${CMAKE_CURRENT_BINARY_DIR}/${sb}c)
set(output $<TARGET_BUNDLE_DIR:MacUpdater>/Contents/Resources/${sb}c)
set(input ${CMAKE_CURRENT_SOURCE_DIR}/${sb})
add_custom_command(OUTPUT ${output}
add_custom_command(TARGET MacUpdater POST_BUILD
COMMAND ${IBTOOL} --errors --warnings --notices --output-format human-readable-text --compile ${output} ${input}
DEPENDS ${input}
COMMENT "Compiling Storyboard ${sb}...")
target_sources(MacUpdater PRIVATE ${output})
set_source_files_properties(${output} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
endforeach()
if(MACOS_CODE_SIGNING)