Hi, I currently have a CMake project with multiple sub-projects where the sub-projects are libraries and executables. The project works on windows and iOS (via XCode). One such sub-project is an executable that can only be run on OSX and must be run after every build. This executable makes a few changes to a couple of source files automatically (mainly for tracking build related information which is automatically generated). To ensure that it runs after every build, a custom target is built which simply runs the previously mentioned exectuable.
Currently, for building iOS libraries and executables, I have the following set in the root CMakeLists set(CMAKE_OSX_SYSROOT iphoneos) With the above line, in XCode I get the iOS targets. What I would like to know is if CMake will be able to mix iOS and OSX targets? I am aware that I create a new CMake project just for this, but then the executable will not be automatically run each time the main project is built. A little hierarchy to make things easier to understand MainProject +- Library1 (compiles on iOS) +- Library2 (compiles on iOS) +- Executable1 (compiles on iOS but does not run on iOS - it must be run automatically when MainProject is built) +- Executable2 (compiles/runs on iOS) +- ToolExecutable1 (runs the executable built by Executable1 - again, Executable1 must be built for OSX only) >From the diagram, I would like XCode to build Library1, Library2 and Exectuable2 for iOS but Executable1 should have OSX as the target platform. As it stands, I cannot switch CMAKE_OSX_SYSROOT midway. Either all sub-projects are targetted for iOS or all are targetted for OSX. I cannot mix the two. Mixing platform targets is possible when manually creating/manipulating XCode projects. So I am wondering whether it is possible to get CMake to build MainProject such that I can control the target for each library and executable. Thanks, Saad
-- 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
