Commit 1af4eb07 authored by Jan Möbius's avatar Jan Möbius
Browse files

Install branding dir to icons to enable the new set in installer packages

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10761 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2a61b076
include (ACGCommon) include (ACGCommon)
include_directories ( include_directories (
.. ..
${CMAKE_SOURCE_DIR}/OpenMesh/src ${CMAKE_SOURCE_DIR}/OpenMesh/src
${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${OPENGL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIR} ${GLEW_INCLUDE_DIR}
${GLUT_INCLUDE_DIR} ${GLUT_INCLUDE_DIR}
) )
# Linking for apple is special here as the linker pulls in the dependencies, we have to set them like in PluginLib! # Linking for apple is special here as the linker pulls in the dependencies, we have to set them like in PluginLib!
if( APPLE ) if( APPLE )
# search all ObjectTypes in the ObjectType directory for additional build information # search all ObjectTypes in the ObjectType directory for additional build information
file ( file (
GLOB _plugin_buildinfos GLOB _plugin_buildinfos
RELATIVE "${CMAKE_SOURCE_DIR}" RELATIVE "${CMAKE_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/ObjectTypes/*/CMakeLists.txt" "${CMAKE_SOURCE_DIR}/ObjectTypes/*/CMakeLists.txt"
) )
# include all cmake files fouund for objecttypes here # include all cmake files fouund for objecttypes here
foreach ( _buildInfo ${_plugin_buildinfos}) foreach ( _buildInfo ${_plugin_buildinfos})
include ("${CMAKE_SOURCE_DIR}/${_buildInfo}") include ("${CMAKE_SOURCE_DIR}/${_buildInfo}")
endforeach () endforeach ()
link_directories ( link_directories (
${GLEW_LIBRARY_DIR} ${GLEW_LIBRARY_DIR}
${ADDITIONAL_PLUGINLIB_LINK_DIRS} ${ADDITIONAL_PLUGINLIB_LINK_DIRS}
) )
else (APPLE) else (APPLE)
link_directories ( link_directories (
${GLEW_LIBRARY_DIR} ${GLEW_LIBRARY_DIR}
) )
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
../widgets/optionsWidget ../widgets/optionsWidget
../widgets/PluginDialog ../widgets/PluginDialog
../widgets/viewModeWidget ../widgets/viewModeWidget
../widgets/videoCaptureDialog ../widgets/videoCaptureDialog
../widgets/snapshotDialog ../widgets/snapshotDialog
../widgets/stereoSettingsWidget ../widgets/stereoSettingsWidget
) )
# collect all header,source and ui files # collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories}) acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories}) acg_append_files (sources "*.cc" ${directories})
acg_append_files (ui "*.ui" ${directories}) acg_append_files (ui "*.ui" ${directories})
# remove template cc files from source file list # remove template cc files from source file list
acg_drop_templates (sources) acg_drop_templates (sources)
# genereate uic and moc targets # genereate uic and moc targets
acg_qt4_autouic (uic_targets ${ui}) acg_qt4_autouic (uic_targets ${ui})
acg_qt4_automoc (moc_targets ${headers}) acg_qt4_automoc (moc_targets ${headers})
if (WIN32) if (WIN32)
# add app icon rc file to windows build # add app icon rc file to windows build
acg_add_executable (OpenFlipper WIN32 ${CMAKE_CURRENT_SOURCE_DIR}/CoreApp.rc ${uic_targets} ${sources} ${headers} ${moc_targets}) acg_add_executable (OpenFlipper WIN32 ${CMAKE_CURRENT_SOURCE_DIR}/CoreApp.rc ${uic_targets} ${sources} ${headers} ${moc_targets})
# link to qtmain library to get WinMain function for a non terminal app # link to qtmain library to get WinMain function for a non terminal app
target_link_libraries (OpenFlipper ${QT_QTMAIN_LIBRARY}) target_link_libraries (OpenFlipper ${QT_QTMAIN_LIBRARY})
elseif (APPLE) elseif (APPLE)
# generate bundle on mac # generate bundle on mac
acg_add_executable (OpenFlipper MACOSX_BUNDLE ${uic_targets} ${sources} ${headers} ${moc_targets}) acg_add_executable (OpenFlipper MACOSX_BUNDLE ${uic_targets} ${sources} ${headers} ${moc_targets})
else () else ()
acg_add_executable (OpenFlipper ${uic_targets} ${sources} ${headers} ${moc_targets}) acg_add_executable (OpenFlipper ${uic_targets} ${sources} ${headers} ${moc_targets})
endif () endif ()
# Mark this build part as building OpenFLippers Core # Mark this build part as building OpenFLippers Core
add_definitions(-DOPENFLIPPERCORE ) add_definitions(-DOPENFLIPPERCORE )
target_link_libraries (OpenFlipper target_link_libraries (OpenFlipper
OpenMeshCore OpenMeshCore
OpenMeshTools OpenMeshTools
ACG ACG
PluginLib PluginLib
${QT_LIBRARIES} ${QT_LIBRARIES}
${OPENGL_LIBRARIES} ${OPENGL_LIBRARIES}
${GLEW_LIBRARY} ${GLEW_LIBRARY}
${GLUT_LIBRARIES} ${GLUT_LIBRARIES}
${FTGL_LIBS} ${FTGL_LIBS}
) )
if (APPLE) if (APPLE)
# create bundle in "Build" directory and set icon # create bundle in "Build" directory and set icon
# no install needed here, because the whole bundle will be installed in the # no install needed here, because the whole bundle will be installed in the
# toplevel CMakeLists.txt # toplevel CMakeLists.txt
set_target_properties ( 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"
) )
if ( EXISTS ${CMAKE_SOURCE_DIR}/branding ) if ( EXISTS ${CMAKE_SOURCE_DIR}/branding )
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_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 )
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" ) set ( APPLE_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/../Icons/OpenFlipper_Icon.icns" CACHE FILEPATH "Path to the Bundle Icon" )
ENDIF(NOT APPLE_BUNDLE_ICON ) ENDIF(NOT APPLE_BUNDLE_ICON )
endif() endif()
add_custom_command(TARGET OpenFlipper POST_BUILD 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" COMMAND ${CMAKE_COMMAND} -E copy_if_different "${APPLE_BUNDLE_ICON}" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/OpenFlipper.icns"
) )
# Required for Snow leopard, and the latest qt. Then the resources have to be copied # Required for Snow leopard, and the latest qt. Then the resources have to be copied
if ( EXISTS "/opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/Resources/qt_menu.nib" ) if ( EXISTS "/opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/Resources/qt_menu.nib" )
add_custom_command(TARGET OpenFlipper POST_BUILD add_custom_command(TARGET OpenFlipper POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory "/opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/Resources/qt_menu.nib" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/qt_menu.nib" COMMAND ${CMAKE_COMMAND} -E copy_directory "/opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/Resources/qt_menu.nib" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/qt_menu.nib"
) )
endif () endif ()
endif () endif ()
# Translations # Translations
set (trans_files ${sources}) set (trans_files ${sources})
list (APPEND trans_files ${ui}) list (APPEND trans_files ${ui})
list (APPEND trans_files ${headers}) list (APPEND trans_files ${headers})
acg_add_translations (OpenFlipper "de_DE" "${trans_files}") acg_add_translations (OpenFlipper "de_DE" "${trans_files}")
# copy all needed files to "Build" directory to allow a direct execution from it # copy all needed files to "Build" directory to allow a direct execution from it
# the copy_after_build macro (common.cmake) copies the whole directory without svn files # the copy_after_build macro (common.cmake) copies the whole directory without svn files
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Shaders" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Shaders") acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Shaders" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Shaders")
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Textures" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Textures") acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Textures" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Textures")
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Scripts" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Scripts") acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Scripts" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Scripts")
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Licenses" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Licenses") acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Licenses" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Licenses")
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Icons" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Icons") acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Icons" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Icons")
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Fonts" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Fonts") acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Fonts" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Fonts")
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")
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Documentation/DocBase" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc") acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Documentation/DocBase" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc")
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" "${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" "${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" "${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 /usr/bin/qt_menu.nib ) if ( EXISTS /usr/bin/qt_menu.nib )
acg_copy_after_build( OpenFlipper "/usr/bin/qt_menu.nib" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/qt_menu.nib") acg_copy_after_build( OpenFlipper "/usr/bin/qt_menu.nib" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/qt_menu.nib")
endif() endif()
endif( APPLE ) endif( APPLE )
if (NOT APPLE) if (NOT APPLE)
# install all needed files # install all needed files
# the install_dir macro (common.cmake) installs the whole directory without svn files # the install_dir macro (common.cmake) installs the whole directory without svn files
# no install for mac needed here, because the whole bundle will be installed in the # no install for mac needed here, because the whole bundle will be installed in the
# toplevel CMakeLists.txt # toplevel CMakeLists.txt
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Shaders" "${ACG_PROJECT_DATADIR}/Shaders") acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Shaders" "${ACG_PROJECT_DATADIR}/Shaders")
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Textures" "${ACG_PROJECT_DATADIR}/Textures") acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Textures" "${ACG_PROJECT_DATADIR}/Textures")
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Scripts" "${ACG_PROJECT_DATADIR}/Scripts") acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Scripts" "${ACG_PROJECT_DATADIR}/Scripts")
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Icons" "${ACG_PROJECT_DATADIR}/Icons") acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Icons" "${ACG_PROJECT_DATADIR}/Icons")
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Licenses" "${ACG_PROJECT_DATADIR}/Licenses") acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Licenses" "${ACG_PROJECT_DATADIR}/Licenses")
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Fonts" "${ACG_PROJECT_DATADIR}/Fonts") acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Fonts" "${ACG_PROJECT_DATADIR}/Fonts")
# acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Help" "${ACG_PROJECT_DATADIR}/Help") # acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Help" "${ACG_PROJECT_DATADIR}/Help")
#todo install splash file for windows and Linux branding if ( EXISTS ${CMAKE_SOURCE_DIR}/branding )
endif () 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 ()
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