Hello, I'm using CMake to build a Mac OS X app, generating an Xcode project. I have two targets, say "projApp" and "projLib". I'd like for them to be built in such a way that projLib's output is installed in a subdirectory of projApp's output folder. I tried this:
set_target_properties(projApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY path/to/somewhere) set_target_properties(projLib PROPERTIES LIBRARY_OUTPUT_DIRECTORY path/to/somewhere/lib) The thing is, Xcode actually puts projApp in path/to/somewhere/[Debug|Release|RelWithDebInfo|MinSizeRel], so that doesn't work. The configuration that controls this is called "Per-configuration build products path", or CONFIGURATION_BUILD_DIR, whose default value is $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME). Then I tried this: set_target_properties(projApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY path/to/somewhere) set_target_properties(projLib PROPERTIES XCODE_ATTRIBUTE_CONFIGURATION_BUILD_DIR path/to/somewhere/$(CONFIGURATION)/lib) Which should override CONFIGURATION_BUILD_DIR for projLib, thus putting it in the right directory. However, when I try to open the generated xcodeproj, Xcode says it can't parse the file and refuses to open the project. Investigating further, it seems that any use of a $(VAR) macro in an Xcode attribute renders the .xcodeproj unparsable. Does anyone have any experience doing this? Is there perhaps an easier way to achieve what I want? Thanks, Pedro
_______________________________________________ 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
