On 10/06/2015 09:49 AM, Francesco Romano wrote: > - Compilation of the project. > I want the user to be able to compile the project on its machine > (so build system = deployment system). Of course I can document > that he has to explicitly pass the variable to cmake, but it > does not seem too user friendly to me
Your project should not be setting CMAKE_OSX_DEPLOYMENT_TARGET in its code. If you don't set this then CMAKE_OSX_SYSROOT is not needed. Both are meant to be set by end users. If the deployment target is their own machine then neither needs to be set and it should just work. > - Brew formula. > I have to use ruby to detect the user platform and configure > the arguments to cmake accordingly. If the build targets the current system then again there is no need to set either variable. Or, you can set both by using a symbolic SDK name rather than the path. For example: -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCMAKE_OSX_SYSROOT=macosx10.9 > I also want to add that this issue arose with Xcode 7. > Indeed Apple ships now (first the first time) only the 10.11 SDK, > even if the system is 10.10. And this is what is causing the issue, > because cmake automatically set the deployment target to match > the sdk and not the build system. Okay, that looks like the underlying issue. The Modules/Platform/Darwin-Initialize.cmake module will have to be taught about this case to do the right thing by default if it does not already. Gregor, do you mind taking a look at this? Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
