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)
endif(APPLE)
# source code directories
set (directories
..
set (directories
..
../Core
../Logging
../Scripting
../Scripting/scriptPrototypes
../Scripting/scriptWrappers
../SimpleOpt
../widgets/aboutWidget
../widgets/aboutWidget
../widgets/addEmptyWidget
../widgets/loggerWidget
../widgets/coreWidget
../widgets/coreWidget
../widgets/helpWidget
../widgets/processManagerWidget
../widgets/loadWidget
......@@ -78,8 +78,8 @@ if (QT5_FOUND)
acg_qt5_autouic (uic_targets ${ui})
acg_qt5_automoc (moc_targets ${headers})
else ()
acg_qt4_autouic (uic_targets ${ui})
acg_qt4_automoc (moc_targets ${headers})
acg_qt4_autouic (uic_targets ${ui})
acg_qt4_automoc (moc_targets ${headers})
endif()
if (WIN32)
......@@ -110,7 +110,7 @@ endif ()
# ====================================================================================
# 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
# ====================================================================================
# Get the property containing the list of all dependencies of the plugins
......@@ -161,7 +161,6 @@ target_link_libraries (OpenFlipper
${GLUT_LIBRARIES}
${FTGL_LIBS}
${COREAPP_ADDITIONAL_LINK_LIBRARIES}
)
if (APPLE)
......@@ -175,28 +174,34 @@ if (APPLE)
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
set ( APPLE_BUNDLE_ICON "${CMAKE_SOURCE_DIR}\\branding\\mac\\OpenFlipper_Icon.icns" CACHE FILEPATH "Path to the Bundle Icon" )
ENDIF(NOT APPLE_BUNDLE_ICON )
IF ( NOT APPLE_INFO_PLIST )
if ( EXISTS ${CMAKE_SOURCE_DIR}/branding/mac/Info.plist )
# option to configure the custom Info.plist
set ( APPLE_INFO_PLIST "${CMAKE_SOURCE_DIR}\\branding\\mac\\Info.plist" CACHE FILEPATH "Path to the Info.plist file for Bundle" )
else ( EXISTS ${CMAKE_SOURCE_DIR}/branding/mac/Info.plist )
# option to configure a custum Info.plist but configure with default one
set ( APPLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/../installer/mac/Info.plist" CACHE FILEPATH "Path to the Info.plist file for Bundle" )
endif( EXISTS ${CMAKE_SOURCE_DIR}/branding/mac/Info.plist )
ENDIF(NOT APPLE_INFO_PLIST )
ENDIF(NOT APPLE_BUNDLE_ICON )
# Take plist from branding
IF ( NOT APPLE_INFO_PLIST )
if ( EXISTS ${CMAKE_SOURCE_DIR}/branding/mac/Info.plist )
# option to configure the custom Info.plist
set ( APPLE_INFO_PLIST "${CMAKE_SOURCE_DIR}\\branding\\mac\\Info.plist" CACHE FILEPATH "Path to the Info.plist file for Bundle" )
else ( EXISTS ${CMAKE_SOURCE_DIR}/branding/mac/Info.plist )
# option to configure a custum Info.plist but configure with default one
set ( APPLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/../installer/mac/Info.plist" CACHE FILEPATH "Path to the Info.plist file for Bundle" )
endif( EXISTS ${CMAKE_SOURCE_DIR}/branding/mac/Info.plist )
ENDIF(NOT APPLE_INFO_PLIST )
else()
IF ( NOT APPLE_BUNDLE_ICON )
# 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 )
IF ( NOT APPLE_INFO_PLIST )
......@@ -205,22 +210,21 @@ if (APPLE)
ENDIF(NOT APPLE_INFO_PLIST )
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"
)
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
# no install needed here, because the whole bundle will be installed in the
# 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
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Build"
MACOSX_BUNDLE_INFO_STRING "ACG OpenFlipper"
MACOSX_BUNDLE_ICON_FILE "OpenFlipper.icns"
MACOSX_BUNDLE_INFO_PLIST ${APPLE_INFO_PLIST}
)
)
endif ()
......@@ -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")
if ( EXISTS ${CMAKE_SOURCE_DIR}/branding )
if ( WIN32 )
acg_copy_after_build (OpenFlipper "${CMAKE_SOURCE_DIR}/branding/win" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Icons")
if ( WIN32 )
acg_copy_after_build (OpenFlipper "${CMAKE_SOURCE_DIR}/branding/win/Icons" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Icons")
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()
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()
if ( APPLE )
if ( APPLE )
# we need qt_menu.nib in our resources dir so try to get it
if ( EXISTS /opt/local/lib/Resources/qt_menu.nib )
......@@ -277,7 +281,7 @@ if ( APPLE )
endif()
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
if ( _file MATCHES ".*debug.*" )
add_custom_command(TARGET OpenFlipper POST_BUILD
......@@ -286,7 +290,7 @@ if ( APPLE )
endif()
endif()
endforeach ()
elseif(WIN32)
......@@ -321,15 +325,17 @@ if (NOT APPLE)
install( FILES "@CMAKE_BINARY_DIR@/Build/qt.conf" DESTINATION "${ACG_PROJECT_DATADIR}/" )
acg_install_dir ("${CMAKE_BINARY_DIR}/Build/QtPlugins/" "${ACG_PROJECT_DATADIR}/QtPlugins")
endif(WIN32)
if ( EXISTS ${CMAKE_SOURCE_DIR}/branding )
if ( WIN32 )
if ( EXISTS ${CMAKE_SOURCE_DIR}/branding/win )
if ( WIN32 )
acg_install_dir ( "${CMAKE_SOURCE_DIR}/branding/win" "${ACG_PROJECT_DATADIR}/Icons")
endif()
endif()
#todo install splash file for windows and Linux branding
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