Commit aba9fb2a authored by Jan Möbius's avatar Jan Möbius

Dennis: MacOs Bundle

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5789 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b7d592f5
...@@ -49,6 +49,8 @@ qt4_automoc (moc_targets ${headers}) ...@@ -49,6 +49,8 @@ qt4_automoc (moc_targets ${headers})
if (WIN32) if (WIN32)
add_executable (OpenFlipper ${CMAKE_CURRENT_SOURCE_DIR}/CoreApp.rc ${uic_targets} ${sources} ${headers} ${moc_targets}) add_executable (OpenFlipper ${CMAKE_CURRENT_SOURCE_DIR}/CoreApp.rc ${uic_targets} ${sources} ${headers} ${moc_targets})
elseif (APPLE)
add_executable (OpenFlipper MACOSX_BUNDLE ${uic_targets} ${sources} ${headers} ${moc_targets})
else () else ()
add_executable (OpenFlipper ${uic_targets} ${sources} ${headers} ${moc_targets}) add_executable (OpenFlipper ${uic_targets} ${sources} ${headers} ${moc_targets})
endif () endif ()
...@@ -67,7 +69,16 @@ target_link_libraries (OpenFlipper ...@@ -67,7 +69,16 @@ target_link_libraries (OpenFlipper
${FTGL_LIBS} ${FTGL_LIBS}
) )
install (TARGETS OpenFlipper DESTINATION ${OPENFLIPPER_BINDIR}) if (APPLE)
set_target_properties (
OpenFlipper PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Build"
MACOSX_BUNDLE_INFO_STRING "ACG OpenFlipper"
MACOSX_BUNDLE_ICON_FILE "Icons/OpenFlipper_Icon.icns"
)
else ()
install (TARGETS OpenFlipper DESTINATION ${OPENFLIPPER_BINDIR})
endif ()
if (WIN32) if (WIN32)
add_custom_command (TARGET OpenFlipper POST_BUILD add_custom_command (TARGET OpenFlipper POST_BUILD
...@@ -77,21 +88,20 @@ if (WIN32) ...@@ -77,21 +88,20 @@ if (WIN32)
${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_BINDIR}/OpenFlipper.exe) ${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_BINDIR}/OpenFlipper.exe)
endif () endif ()
add_custom_command(TARGET OpenFlipper POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../Shaders ${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_DATADIR}/Shaders
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../Textures ${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_DATADIR}/Textures
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../Icons ${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_DATADIR}/Icons
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../Fonts ${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_DATADIR}/Fonts
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../Docs ${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_DATADIR}/Docs
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../Help ${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_DATADIR}/Help
)
install(DIRECTORY copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Shaders" "${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_DATADIR}/Shaders")
${CMAKE_CURRENT_SOURCE_DIR}/../Shaders copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Textures" "${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_DATADIR}/Textures")
${CMAKE_CURRENT_SOURCE_DIR}/../Textures copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Icons" "${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_DATADIR}/Icons")
${CMAKE_CURRENT_SOURCE_DIR}/../Icons copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Fonts" "${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_DATADIR}/Fonts")
${CMAKE_CURRENT_SOURCE_DIR}/../Fonts copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Docs" "${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_DATADIR}/Docs")
${CMAKE_CURRENT_SOURCE_DIR}/../Docs copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Help" "${CMAKE_BINARY_DIR}/Build/${OPENFLIPPER_DATADIR}/Help")
${CMAKE_CURRENT_SOURCE_DIR}/../Help
DESTINATION ${OPENFLIPPER_DATADIR}
) if (NOT APPLE)
install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Shaders" "${OPENFLIPPER_DATADIR}/Shaders")
install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Textures" "${OPENFLIPPER_DATADIR}/Textures")
install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Icons" "${OPENFLIPPER_DATADIR}/Icons")
install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Fonts" "${OPENFLIPPER_DATADIR}/Fonts")
install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Docs" "${OPENFLIPPER_DATADIR}/Docs")
install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Help" "${OPENFLIPPER_DATADIR}/Help")
endif ()
\ No newline at end of file
...@@ -61,7 +61,9 @@ target_link_libraries (PluginLib ...@@ -61,7 +61,9 @@ target_link_libraries (PluginLib
${FTGL_LIBS} ${FTGL_LIBS}
) )
install (TARGETS PluginLib DESTINATION ${OPENFLIPPER_LIBDIR}) if (NOT APPLE)
install (TARGETS PluginLib DESTINATION ${OPENFLIPPER_LIBDIR})
endif ()
if (WIN32) if (WIN32)
add_custom_command (TARGET PluginLib POST_BUILD add_custom_command (TARGET PluginLib POST_BUILD
......
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