[CMake] Resources duplicated into source tree in XCode

Darrell Blake darrell.blake at gmail.com
Fri Nov 23 17:03:45 EST 2012


*without CMake (not "without XCode").

Apparently I'm incapable of using email today.


On 23 November 2012 21:58, Darrell Blake <darrell.blake at gmail.com> wrote:

> Sorry. I sent the previous version prematurely :/
>
> What effectively happens is, in XCode I get a project that looks like this:
>
> /Sources
>     /ALL_BUILD
>     /ZERO_CHECK
>     /MyApp
>         /Source Files
>             main.cpp
>             file.cpp
>             blah.cpp
>         /Header Files
>             file.h
>             blah.h
>     resource1
>     resource2
>     resource3
> /Resources
>     resource1
>     resource2
>     resource3
>
> The resource files are included in the Source group as well as the
> Resource group and there's no need for them to be in the Source group at
> all. If I were creating the project without XCode I would just drag the
> resources into the Resource group.
>
> Darrell
>
>
>
> On 23 November 2012 21:26, David Cole <david.cole at kitware.com> wrote:
>
>> What do you mean they get duplicated into the Source tree? The input
>> is in the source tree, right?
>>
>>
>> On Fri, Nov 23, 2012 at 3:49 PM, Darrell Blake <darrell.blake at gmail.com>
>> wrote:
>> > I've created a CMake project which adds resources to XCode similar to
>> this:
>> >
>> > set(source_files main.cpp file.cpp blah.cpp)
>> > set(resource_files resource1 resource2 resource3)
>> > set_source_files_properties(${resource_files} PROPERTIES
>> > MACOSX_PACKAGE_LOCATION Resources)
>> > add_executable(MyApp MACOSX_BUNDLE ${source_files} ${resource_files})
>> >
>> > Everything seems to work fine but the resource files get duplicated
>> into the
>> > "Source" tree as well as the "Resource" tree. Is there any way to stop
>> this?
>> > I tried removing ${resource_files} from add_executable() but then it
>> fails
>> > to find the resources at all.
>> >
>> > Darrell
>> >
>> >
>> > --
>> >
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the CMake FAQ at:
>> > http://www.cmake.org/Wiki/CMake_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.cmake.org/mailman/listinfo/cmake
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121123/7bf7a40c/attachment-0001.htm>


More information about the CMake mailing list