Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add resource bundle into a xcode project using cmake?

I am trying to add a resource bundle into a generated xcode project with cmake. However I am having trouble getting this out. This is what i have so far?

set(MACOSX_BUNDLE_RESOURCES "${CMAKE_SOURCE_DIR}/resource.bundle")
set_source_files_properties(MACOSX_BUNDLE_RESOURCES PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
add_executable(project MACOSX_BUNDLE ${FILES_SRC} ${FILES_RSC})

It seems it doesn't see resource.bundle package at all. Any help will be appreciated.

like image 461
Frank Avatar asked May 26 '26 07:05

Frank


1 Answers

Seems I found a solution:

file(GLOB FILES_RSC "${CMAKE_SOURCE_DIR}/resource.bundle")
set_source_files_properties(${FILES_RSC} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
like image 121
Frank Avatar answered Jun 01 '26 08:06

Frank



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!