[cmake-developers] cmake xcode ios Build Phases > New Copy Files Phase?

Peter List pem.list at gmail.com
Thu Sep 10 01:45:28 EDT 2015


In case it helps someone else, here's what I have:

# after link, add exe
file(GLOB SRC_LIST shaders/* main.cpp)
if(${IsIOS})
set_source_files_properties(shaders PROPERTIES MACOSX_PACKAGE_LOCATION
Resources)
add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${SRC_LIST} shaders)
else()
add_executable(${PROJECT_NAME} ${SRC_LIST})
endif()

It's a bit weird because I have both "shaders/*" and "shaders".  However,
"shaders/*" is required for Qt Creator to see my GLSL shader files, while
"shaders" is required for XCode iOS's Copy Bundle Resource.

Oh I guess "Copy Bundle Resource" is not the same as "Copy Files"...  But I
got something that works, and I'll have to look into the difference between
those as a separate issue...




On Thu, Sep 10, 2015 at 1:20 AM, Peter List <pem.list at gmail.com> wrote:

> Actually I guess I found the answer here...
>
>
> https://stackoverflow.com/questions/30430968/add-xcode-build-phase-via-cmake
>
>
> On Thu, Sep 10, 2015 at 1:09 AM, Peter List <pem.list at gmail.com> wrote:
>
>> I use cmake to generate an iOS xcode project for "ios-cmake-master".
>> Then I have to can manually add my "shaders" folder to xcode > cmd+4 >
>> Build Phases > + New Copy Files Phase > Destination = Resources, + to add
>> my "shaders" folder.  This allows me to have XCode copy my GLSL "shaders"
>> folder (or other files) into the iOS simulator when I run my project.
>>
>> So my question is...  How do I tell CMake to generate my .xcodeproj file
>> with this Build Phase?  I shouldn't need to manually edit my .xcodeproj
>> file...
>>
>> thank you for any leads
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150910/53d8846e/attachment.html>


More information about the cmake-developers mailing list