Verified Commit 898fde35 authored by A. Wilcox's avatar A. Wilcox
Browse files

Mac: Build XIBs properly with CMake

parent 4598c51e
......@@ -18,12 +18,27 @@ set(COCOA_UI_SOURCES
main.m)
set(COCOA_UI_RESOURCES
AXAccountsWindow.xib
AXSignInWindow.xib
Auctions.xib
Auctions.icns
)
set(COCOA_UI_XIBS
AXAccountsWindow
AXSignInWindow
Auctions
)
add_executable(Auctions MACOSX_BUNDLE ${COCOA_UI_SOURCES} ${COCOA_UI_RESOURCES})
set(COCOA_COMPILED_NIBS)
find_program(IBTOOL ibtool REQUIRED)
foreach(XIBFILE ${COCOA_UI_XIBS})
add_custom_command(TARGET Auctions POST_BUILD
COMMAND ${IBTOOL} --compile ${CMAKE_CURRENT_BINARY_DIR}/Auctions.app/Contents/Resources/${XIBFILE}.nib ${CMAKE_CURRENT_SOURCE_DIR}/${XIBFILE}.xib
COMMENT "Compiling NIB file ${XIBFILE}.nib")
list(APPEND COCOA_COMPILED_NIBS ${CMAKE_CURRENT_BINARY_DIR}/${XIBFILE}.nib)
endforeach()
set_target_properties(Auctions PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_GUI_IDENTIFIER com.wilcox-tech.cocoa.Auctions
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment