[CMake] Adding directories to XCode Resources

Darrell Blake darrell.blake at gmail.com
Tue Mar 22 19:32:51 EDT 2011


Currently, I'm adding files to my XCode resources similar to this:

file(GLOB_RECURSE resFiles
  ${CMAKE_SOURCE_DIR}/Res/Images/*
  ${CMAKE_SOURCE_DIR}/Res/Music/*
)

set_source_files_properties(
  ${resFiles}
  PROPERTIES
  MACOSX_PACKAGE_LOCATION Resources
)

add_executable(Project, MACOSX_BUNDLE ${sourceFiles} ${resFiles})

The problem with the above is that it adds any files into the root of
the Resources in XCode. What I'm wanting to do is keep the directory
structure so that in my Resources directory I have directories such as
Images and Music with respective files stored in the correct
directories. I'm sure there'll be an easy way to do this but I'm
having trouble finding out what it is.

Cheers,

Darrell


More information about the CMake mailing list