Hi,

We are building a lib and an example app in Xcode (4.2) targeting iOS (5.0).

The top-level CMakeLists.txt recurses into lib and example:

PROJECT(Suite)
ADD_SUBDIRECTORY(MyLibrary)
ADD_SUBDIRECTORY(MyExample)

The lib is built in the traditional way…

PROJECT(MyLib)
… 
ADD_LIBRARY( ${MYLIB_SOURCES} )

As is the example:

PROJECT(MyExample)
…
ADD_EXECUTABLE(MyExample MACOS_BUNDLE ${MYEXAMPLE_SOURCES})
TARGET_LINK_LIBRARIES( MyExample MyLib)
ADD_DEPENDENCIES(MyExample MyLib)

But during linking of the example, MyExample expects the built lib to be in:

path/to/build/MyLibrary/Debug/

While Xcode will build to

path/to/build/MyLibrary/Debug-iphonesimulator/

or

path/to/build/MyLibrary/Debug-iphoneos/

depending on the scheme you select.

Anyone know how to get "inbetween", letting CMake know there is this 
"-iphoneos" or "-iphonesimulator" postfix needed.

Thanks,
Daniel




--

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

Reply via email to