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

Fixed the cmake commit which reverted most of the branding

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17087 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 39208698
...@@ -39,18 +39,18 @@ else (APPLE) ...@@ -39,18 +39,18 @@ else (APPLE)
endif(APPLE) endif(APPLE)
# source code directories # source code directories
set (directories set (directories
.. ..
../Core ../Core
../Logging ../Logging
../Scripting ../Scripting
../Scripting/scriptPrototypes ../Scripting/scriptPrototypes
../Scripting/scriptWrappers ../Scripting/scriptWrappers
../SimpleOpt ../SimpleOpt
../widgets/aboutWidget ../widgets/aboutWidget
../widgets/addEmptyWidget ../widgets/addEmptyWidget
../widgets/loggerWidget ../widgets/loggerWidget
../widgets/coreWidget ../widgets/coreWidget
../widgets/helpWidget ../widgets/helpWidget
../widgets/processManagerWidget ../widgets/processManagerWidget
../widgets/loadWidget ../widgets/loadWidget
...@@ -78,8 +78,8 @@ if (QT5_FOUND) ...@@ -78,8 +78,8 @@ if (QT5_FOUND)
acg_qt5_autouic (uic_targets ${ui}) acg_qt5_autouic (uic_targets ${ui})
acg_qt5_automoc (moc_targets ${headers}) acg_qt5_automoc (moc_targets ${headers})
else () else ()
acg_qt4_autouic (uic_targets ${ui}) acg_qt4_autouic (uic_targets ${ui})
acg_qt4_automoc (moc_targets ${headers}) acg_qt4_automoc (moc_targets ${headers})
endif() endif()
if (WIN32) if (WIN32)
...@@ -110,7 +110,7 @@ endif () ...@@ -110,7 +110,7 @@ endif ()
# ==================================================================================== # ====================================================================================
# Get list of ll plugin dependencies and handle special ones # Get list of ll plugin dependencies and handle special ones
# where we need to link the library directly into the core to prevent # where we need to link the library directly into the core to prevent
# linker problems # linker problems
# ==================================================================================== # ====================================================================================
# Get the property containing the list of all dependencies of the plugins # Get the property containing the list of all dependencies of the plugins
...@@ -161,7 +161,6 @@ target_link_libraries (OpenFlipper ...@@ -161,7 +161,6 @@ target_link_libraries (OpenFlipper
${GLUT_LIBRARIES} ${GLUT_LIBRARIES}
${FTGL_LIBS} ${FTGL_LIBS}
${COREAPP_ADDITIONAL_LINK_LIBRARIES} ${COREAPP_ADDITIONAL_LINK_LIBRARIES}
) )
if (APPLE) if (APPLE)
...@@ -175,28 +174,34 @@ if (APPLE) ...@@ -175,28 +174,34 @@ if (APPLE)
MACOSX_BUNDLE_ICON_FILE "OpenFlipper.icns" MACOSX_BUNDLE_ICON_FILE "OpenFlipper.icns"
) )
if ( EXISTS ${CMAKE_SOURCE_DIR}/branding ) if ( EXISTS ${CMAKE_SOURCE_DIR}/branding )
IF ( NOT APPLE_BUNDLE_ICON ) # Take bundle icon from branding dir
IF ( NOT APPLE_BUNDLE_ICON )
# option to set the used Icon for OpenFlipper # option to set the used Icon for OpenFlipper
set ( APPLE_BUNDLE_ICON "${CMAKE_SOURCE_DIR}\\branding\\mac\\OpenFlipper_Icon.icns" CACHE FILEPATH "Path to the Bundle Icon" ) set ( APPLE_BUNDLE_ICON "${CMAKE_SOURCE_DIR}\\branding\\mac\\OpenFlipper_Icon.icns" CACHE FILEPATH "Path to the Bundle Icon" )
ENDIF(NOT APPLE_BUNDLE_ICON ) ENDIF(NOT APPLE_BUNDLE_ICON )
IF ( NOT APPLE_INFO_PLIST ) # Take plist from branding
if ( EXISTS ${CMAKE_SOURCE_DIR}/branding/mac/Info.plist ) IF ( NOT APPLE_INFO_PLIST )
# option to configure the custom Info.plist if ( EXISTS ${CMAKE_SOURCE_DIR}/branding/mac/Info.plist )
set ( APPLE_INFO_PLIST "${CMAKE_SOURCE_DIR}\\branding\\mac\\Info.plist" CACHE FILEPATH "Path to the Info.plist file for Bundle" ) # option to configure the custom Info.plist
else ( EXISTS ${CMAKE_SOURCE_DIR}/branding/mac/Info.plist ) set ( APPLE_INFO_PLIST "${CMAKE_SOURCE_DIR}\\branding\\mac\\Info.plist" CACHE FILEPATH "Path to the Info.plist file for Bundle" )
# option to configure a custum Info.plist but configure with default one else ( EXISTS ${CMAKE_SOURCE_DIR}/branding/mac/Info.plist )
set ( APPLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/../installer/mac/Info.plist" CACHE FILEPATH "Path to the Info.plist file for Bundle" ) # option to configure a custum Info.plist but configure with default one
endif( EXISTS ${CMAKE_SOURCE_DIR}/branding/mac/Info.plist ) set ( APPLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/../installer/mac/Info.plist" CACHE FILEPATH "Path to the Info.plist file for Bundle" )
ENDIF(NOT APPLE_INFO_PLIST ) endif( EXISTS ${CMAKE_SOURCE_DIR}/branding/mac/Info.plist )
ENDIF(NOT APPLE_INFO_PLIST )
else() else()
IF ( NOT APPLE_BUNDLE_ICON ) IF ( NOT APPLE_BUNDLE_ICON )
# option to set the used Icon for OpenFlipper # option to set the used Icon for OpenFlipper
set ( APPLE_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/../Icons/OpenFlipper_Icon.icns" CACHE FILEPATH "Path to the Bundle Icon" ) if ( EXISTS ${CMAKE_SOURCE_DIR}/branding/Icons/OpenFlipper_Icon.icns )
set ( APPLE_BUNDLE_ICON " ${CMAKE_SOURCE_DIR}/branding/Icons/OpenFlipper_Icon.icns" CACHE FILEPATH "Path to the Bundle Icon" )
else()
set ( APPLE_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/../Icons/OpenFlipper_Icon.icns" CACHE FILEPATH "Path to the Bundle Icon" )
endif()
ENDIF(NOT APPLE_BUNDLE_ICON ) ENDIF(NOT APPLE_BUNDLE_ICON )
IF ( NOT APPLE_INFO_PLIST ) IF ( NOT APPLE_INFO_PLIST )
...@@ -205,22 +210,21 @@ if (APPLE) ...@@ -205,22 +210,21 @@ if (APPLE)
ENDIF(NOT APPLE_INFO_PLIST ) ENDIF(NOT APPLE_INFO_PLIST )
endif() endif()
add_custom_command(TARGET OpenFlipper POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${APPLE_BUNDLE_ICON}" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/OpenFlipper.icns"
)
# create bundle in "Build" directory and set icon
add_custom_command(TARGET OpenFlipper POST_BUILD # no install needed here, because the whole bundle will be installed in the
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${APPLE_BUNDLE_ICON}" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/OpenFlipper.icns" # toplevel CMakeLists.txt
) set_target_properties (
# create bundle in "Build" directory and set icon
# no install needed here, because the whole bundle will be installed in the
# toplevel CMakeLists.txt
set_target_properties (
OpenFlipper PROPERTIES OpenFlipper PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Build" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Build"
MACOSX_BUNDLE_INFO_STRING "ACG OpenFlipper" MACOSX_BUNDLE_INFO_STRING "ACG OpenFlipper"
MACOSX_BUNDLE_ICON_FILE "OpenFlipper.icns" MACOSX_BUNDLE_ICON_FILE "OpenFlipper.icns"
MACOSX_BUNDLE_INFO_PLIST ${APPLE_INFO_PLIST} MACOSX_BUNDLE_INFO_PLIST ${APPLE_INFO_PLIST}
) )
endif () endif ()
...@@ -242,17 +246,17 @@ acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Fonts" "${CMAK ...@@ -242,17 +246,17 @@ acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Fonts" "${CMAK
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Documentation/QtHelpResources" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Help") acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Documentation/QtHelpResources" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Help")
if ( EXISTS ${CMAKE_SOURCE_DIR}/branding ) if ( EXISTS ${CMAKE_SOURCE_DIR}/branding )
if ( WIN32 ) if ( WIN32 )
acg_copy_after_build (OpenFlipper "${CMAKE_SOURCE_DIR}/branding/win" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Icons") acg_copy_after_build (OpenFlipper "${CMAKE_SOURCE_DIR}/branding/win/Icons" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Icons")
elseif( APPLE ) elseif( APPLE )
acg_copy_after_build (OpenFlipper "${CMAKE_SOURCE_DIR}/branding/mac" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Icons") acg_copy_after_build (OpenFlipper "${CMAKE_SOURCE_DIR}/branding/mac/Icons" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Icons")
elseif() elseif()
acg_copy_after_build (OpenFlipper "${CMAKE_SOURCE_DIR}/branding/linux" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Icons") acg_copy_after_build (OpenFlipper "${CMAKE_SOURCE_DIR}/branding/linux/Icons" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Icons")
endif() endif()
endif() endif()
if ( APPLE ) if ( APPLE )
# we need qt_menu.nib in our resources dir so try to get it # we need qt_menu.nib in our resources dir so try to get it
if ( EXISTS /opt/local/lib/Resources/qt_menu.nib ) if ( EXISTS /opt/local/lib/Resources/qt_menu.nib )
...@@ -277,7 +281,7 @@ if ( APPLE ) ...@@ -277,7 +281,7 @@ if ( APPLE )
endif() endif()
else () else ()
# In debug mode, we don't want release binaries in the bundle as it could cause crashes due to wrong linking or mixing of debug and release # In debug mode, we don't want release binaries in the bundle as it could cause crashes due to wrong linking or mixing of debug and release
if ( _file MATCHES ".*debug.*" ) if ( _file MATCHES ".*debug.*" )
add_custom_command(TARGET OpenFlipper POST_BUILD add_custom_command(TARGET OpenFlipper POST_BUILD
...@@ -286,7 +290,7 @@ if ( APPLE ) ...@@ -286,7 +290,7 @@ if ( APPLE )
endif() endif()
endif() endif()
endforeach () endforeach ()
elseif(WIN32) elseif(WIN32)
...@@ -321,15 +325,17 @@ if (NOT APPLE) ...@@ -321,15 +325,17 @@ if (NOT APPLE)
install( FILES "@CMAKE_BINARY_DIR@/Build/qt.conf" DESTINATION "${ACG_PROJECT_DATADIR}/" ) install( FILES "@CMAKE_BINARY_DIR@/Build/qt.conf" DESTINATION "${ACG_PROJECT_DATADIR}/" )
acg_install_dir ("${CMAKE_BINARY_DIR}/Build/QtPlugins/" "${ACG_PROJECT_DATADIR}/QtPlugins") acg_install_dir ("${CMAKE_BINARY_DIR}/Build/QtPlugins/" "${ACG_PROJECT_DATADIR}/QtPlugins")
endif(WIN32) endif(WIN32)
if ( EXISTS ${CMAKE_SOURCE_DIR}/branding ) if ( EXISTS ${CMAKE_SOURCE_DIR}/branding/win )
if ( WIN32 ) if ( WIN32 )
acg_install_dir ( "${CMAKE_SOURCE_DIR}/branding/win" "${ACG_PROJECT_DATADIR}/Icons") acg_install_dir ( "${CMAKE_SOURCE_DIR}/branding/win" "${ACG_PROJECT_DATADIR}/Icons")
endif() endif()
endif() endif()
#todo install splash file for windows and Linux branding
endif () endif ()
if ( EXISTS ${CMAKE_SOURCE_DIR}/branding/Icons )
# Overwrite generic Icons with branded ones.
acg_copy_after_build (OpenFlipper "${CMAKE_SOURCE_DIR}/branding/Icons" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Icons")
endif()
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