Added several macros

This commit is contained in:
Martin Rotter 2013-06-16 14:01:20 +02:00
parent 5622eab98c
commit 122c7b1e73
2 changed files with 4 additions and 36 deletions

View File

@ -281,38 +281,10 @@ qt5_use_modules(${EXE_NAME}
)
# Installation stage.
#if(APPLE)
# # Mac's bundle install.
# message(STATUS "[qonverter] You will probably install on Mac OS.")
# set_target_properties(${EXE_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/resources/macosx/Info.plist.in")
# set(MACOSX_BUNDLE_ICON_FILE qonverter.icns)
# set(MACOSX_BUNDLE_INFO_STRING "${EXE_NAME} ${APP_VERSION}")
# set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.googlecode.qonverter")
# set(MACOSX_BUNDLE_LONG_VERSION_STRING "${APP_VERSION}")
# set(MACOSX_BUNDLE_BUNDLE_NAME "${EXE_NAME}")
# set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${APP_VERSION}")
# set(MACOSX_BUNDLE_BUNDLE_VERSION "${APP_VERSION}")
# set(MACOSX_BUNDLE_COPYRIGHT "(c) Martin Rotter")
# set_source_files_properties(${CMAKE_SOURCE_DIR}/resources/macosx/qonverter.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
# install(TARGETS ${EXE_NAME} BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX})
# install(FILES ${APP_QM} DESTINATION ${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/Resources/l10n)
# install(FILES ${APP_SKINS} DESTINATION ${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/Resources/skins)
# install(FILES ${APP_MISC} DESTINATION ${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/Resources/information)
# configure_file(resources/macosx/bundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/bundle.cmake @ONLY)
# add_custom_target(bundle ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/bundle.cmake)
#elseif(WIN32)
if(WIN32)
message(STATUS "[${APP_LOW_NAME}] You will probably install on Windows.")
install(TARGETS ${EXE_NAME} RUNTIME DESTINATION ./)
install(FILES ${APP_QM} DESTINATION ./l10n)
install(FILES ${APP_SKIN_PLAIN} DESTINATION ./skins/base)
install(FILES ${APP_SKIN_MODERN} DESTINATION ./skins/base)
install(FILES ${APP_SKIN_DARK} DESTINATION ./skins/fancy)
install(FILES ${APP_SKIN_DARK_IMAGES} DESTINATION ./skins/fancy/images)
install(FILES ${APP_MISC} DESTINATION ./)
elseif(OS2)
message(STATUS "[${APP_LOW_NAME}] You will probably install on OS/2.")
install(TARGETS ${EXE_NAME} RUNTIME DESTINATION ./)
install(FILES resources/graphics/${APP_LOW_NAME}.png DESTINATION ./)
install(FILES ${APP_QM} DESTINATION ./l10n)
install(FILES ${APP_SKIN_PLAIN} DESTINATION ./skins/base)
install(FILES ${APP_SKIN_MODERN} DESTINATION ./skins/base)

View File

@ -28,17 +28,13 @@
#define APP_SKIN_PATH APP_PREFIX + QString("/share/rssguard/skins")
#define APP_INFO_PATH APP_PREFIX + QString("/share/rssguard/information")
#define APP_THEME_PATH APP_PREFIX + QString("/share/rssguard/themes")
#elif defined(Q_OS_MAC)
#define APP_LANG_PATH QApplication::applicationDirPath() + "/../Resources/l10n"
#define APP_SKIN_PATH QApplication::applicationDirPath() + "/../Resources/skins"
#define APP_PLUGIN_PATH QApplication::applicationDirPath() + "/../Resources/plugins"
#define APP_INFO_PATH QApplication::applicationDirPath() + "/../Resources/information"
#define APP_THEME_PATH QApplication::applicationDirPath() + "/../Resources/themes"
#elif defined(Q_OS_WIN) || defined(Q_OS_OS2)
#define APP_ICON_PATH APP_PREFIX + QString("/share/icons/hicolor/256x256/apps/rssguard.png")
#elif defined(Q_OS_WIN)
#define APP_LANG_PATH QApplication::applicationDirPath() + QString("/l10n")
#define APP_SKIN_PATH QApplication::applicationDirPath() + QString("/skins")
#define APP_INFO_PATH QApplication::applicationDirPath()
#define APP_THEME_PATH QApplication::applicationDirPath() + QString("/themes")
#define APP_ICON_PATH QApplication::applicationDirPath() + QString("/rssguard.png")
#endif
#endif // DEFS_H