My CMake rules to convert a .XIB file to a .NIB file in the application bundle work for makefile builds.

However I cannot get the same result when using the Xcode generator. Does anyone have a working example for XCode 3.X or 4 they can share?

The cmakelists.txt script is

Message("We are generating for Xcode ${this_target}")

# Make sure the '.App' directory tree is correctly created before we build
# copy our plist and icon file into place
add_custom_command (TARGET ${this_target} PRE_BUILD
COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/WebViewExample.app COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/WebViewExample.app/Contents COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/WebViewExample.app/Contents/MacOS COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/WebViewExample.app/Contents/Resources COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/WebViewExample.app/Contents/Resources/English.lproj COMMAND cp -n ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/WebViewExample.app/Contents COMMAND cp -n ${CMAKE_CURRENT_SOURCE_DIR}/WV.icns ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/WebViewExample.app/Contents/Resources
                     )

# command to convert any existing IB .xib to .nib in the .APP folder
add_custom_command (TARGET ${this_target} POST_BUILD
COMMAND ${IBTOOL} --errors --warnings --notices --output-format human-readable-text --compile ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/WebViewExample.app/Contents/Resources/English.lproj/MainMenu.nib
                             ${CMAKE_CURRENT_SOURCE_DIR}/MainMenu.xib
                     )

This appears to fail with at the first cp command ...

Thx++

Jerry



--

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