Merge pull request #334 from TheOneRing/ecm
Use ECMAddAppIcon instead of the copy of the kde4 macro.
@ -1,15 +1,20 @@
|
||||
PROJECT( tomahawk )
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.6 )
|
||||
SET( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 )
|
||||
CMAKE_POLICY(SET CMP0017 NEW)
|
||||
|
||||
IF ( CMAKE_VERSION VERSION_EQUAL 2.8.12 OR CMAKE_VERSION VERSION_GREATER 2.8.12 )
|
||||
CMAKE_POLICY(SET CMP0022 NEW)
|
||||
|
||||
# TODO:
|
||||
# Update to NEW and fix things up when we can depend on 2.8.12
|
||||
# Update to NEW and fix things up
|
||||
CMAKE_POLICY(SET CMP0023 OLD)
|
||||
ENDIF()
|
||||
|
||||
# TODO:
|
||||
# Disable automatic qtmain linking
|
||||
CMAKE_POLICY(SET CMP0020 OLD)
|
||||
|
||||
find_package(ECM 1.7.0 REQUIRED NO_MODULE)
|
||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
|
||||
|
||||
|
||||
|
||||
INCLUDE(CMakeDependentOption)
|
||||
|
||||
@ -64,8 +69,11 @@ macro(tomahawk_add_c_flags FLAGS)
|
||||
set( TOMAHAWK_C_FLAGS "${TOMAHAWK_C_FLAGS} ${FLAGS}")
|
||||
endmacro()
|
||||
|
||||
# enforce proper symbol exporting on all platforms
|
||||
tomahawk_add_definitions( "-fvisibility=hidden" )
|
||||
if(NOT WIN32)
|
||||
# enforce proper symbol exporting on all platforms but Windows
|
||||
tomahawk_add_c_flags( "-fvisibility=hidden" )
|
||||
endif()
|
||||
|
||||
# enforce using constBegin, constEnd for const-iterators
|
||||
tomahawk_add_definitions( "-DQT_STRICT_ITERATORS" )
|
||||
|
||||
@ -162,7 +170,7 @@ if( NOT BUILD_WITH_QT4 )
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5Xml REQUIRED)
|
||||
find_package(Qt5X11Extras NO_MODULE)
|
||||
find_package(Qt5X11Extras NO_MODULE QUIET)
|
||||
|
||||
if(Qt5X11Extras_FOUND)
|
||||
set(HAVE_X11 TRUE)
|
||||
|
@ -1,114 +0,0 @@
|
||||
SET(WINDRES_EXECUTABLE ${CMAKE_RC_COMPILER})
|
||||
|
||||
# This macro is taken from kdelibs/cmake/modules/KDE4Macros.cmake.
|
||||
#
|
||||
# Copyright (c) 2006-2009 Alexander Neundorf, <neundorf@kde.org>
|
||||
# Copyright (c) 2006, 2007, Laurent Montel, <montel@kde.org>
|
||||
# Copyright (c) 2007 Matthias Kretz <kretz@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file [in KDE repositories].
|
||||
|
||||
|
||||
# adds application icon to target source list
|
||||
# for detailed documentation see the top of FindKDE4Internal.cmake
|
||||
macro (TOMAHAWK_ADD_APP_ICON appsources outfilename pattern)
|
||||
set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${outfilename})
|
||||
|
||||
if (WIN32)
|
||||
if(NOT WINCE)
|
||||
find_program(PNG2ICO_EXECUTABLE NAMES png2ico)
|
||||
else(NOT WINCE)
|
||||
find_program(PNG2ICO_EXECUTABLE NAMES png2ico PATHS ${HOST_BINDIR} NO_DEFAULT_PATH )
|
||||
endif(NOT WINCE)
|
||||
find_program(WINDRES_EXECUTABLE NAMES windres)
|
||||
if(MSVC)
|
||||
set(WINDRES_EXECUTABLE TRUE)
|
||||
endif(MSVC)
|
||||
if (PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE)
|
||||
string(REPLACE "*" "(.*)" pattern_rx "${pattern}")
|
||||
file(GLOB files "${pattern}")
|
||||
foreach (it ${files})
|
||||
string(REGEX REPLACE "${pattern_rx}" "\\1" fn "${it}")
|
||||
if (fn MATCHES ".*16.*" )
|
||||
list (APPEND _icons ${it})
|
||||
endif (fn MATCHES ".*16.*")
|
||||
if (fn MATCHES ".*32.*" )
|
||||
list (APPEND _icons ${it})
|
||||
endif (fn MATCHES ".*32.*")
|
||||
if (fn MATCHES ".*48.*" )
|
||||
list (APPEND _icons ${it})
|
||||
endif (fn MATCHES ".*48.*")
|
||||
if (fn MATCHES ".*64.*" )
|
||||
list (APPEND _icons ${it})
|
||||
endif (fn MATCHES ".*64.*")
|
||||
if (fn MATCHES ".*128.*" )
|
||||
list (APPEND _icons ${it})
|
||||
endif (fn MATCHES ".*128.*")
|
||||
endforeach (it)
|
||||
if (_icons)
|
||||
add_custom_command(OUTPUT ${_outfilename}.ico ${_outfilename}.rc
|
||||
COMMAND ${PNG2ICO_EXECUTABLE} ARGS --rcfile ${_outfilename}.rc ${_outfilename}.ico ${_icons}
|
||||
DEPENDS ${PNG2ICO_EXECUTABLE} ${_icons}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
if (MINGW)
|
||||
add_custom_command(OUTPUT ${_outfilename}_res.o
|
||||
COMMAND ${WINDRES_EXECUTABLE} ARGS -i ${_outfilename}.rc -o ${_outfilename}_res.o --include-dir=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${WINDRES_EXECUTABLE} ${_outfilename}.rc
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
list(APPEND ${appsources} ${_outfilename}_res.o)
|
||||
else(MINGW)
|
||||
list(APPEND ${appsources} ${_outfilename}.rc)
|
||||
endif(MINGW)
|
||||
else(_icons)
|
||||
message(STATUS "Unable to find a related icon that matches pattern ${pattern} for variable ${appsources} - application will not have an application icon!")
|
||||
endif(_icons)
|
||||
else(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE)
|
||||
message(STATUS "Unable to find the png2ico or windres utilities - application will not have an application icon!")
|
||||
endif(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE)
|
||||
endif(WIN32)
|
||||
if (APPLE)
|
||||
# first convert image to a tiff using the Mac OS X "sips" utility,
|
||||
# then use tiff2icns to convert to an icon
|
||||
find_program(SIPS_EXECUTABLE NAMES sips)
|
||||
find_program(TIFF2ICNS_EXECUTABLE NAMES tiff2icns)
|
||||
if (SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE)
|
||||
file(GLOB_RECURSE files "${pattern}")
|
||||
# we can only test for the 128-icon like that - we don't use patterns anymore
|
||||
foreach (it ${files})
|
||||
if (it MATCHES ".*128.*" )
|
||||
set (_icon ${it})
|
||||
endif (it MATCHES ".*128.*")
|
||||
endforeach (it)
|
||||
|
||||
if (_icon)
|
||||
|
||||
# first, get the basename of our app icon
|
||||
add_custom_command(OUTPUT ${_outfilename}.icns ${_outfilename}.tiff
|
||||
COMMAND ${SIPS_EXECUTABLE} -s format tiff ${_icon} --out ${_outfilename}.tiff
|
||||
COMMAND ${TIFF2ICNS_EXECUTABLE} ${_outfilename}.tiff ${_outfilename}.icns
|
||||
DEPENDS ${_icon}
|
||||
)
|
||||
|
||||
# This will register the icon into the bundle
|
||||
set(MACOSX_BUNDLE_ICON_FILE ${appsources}.icns)
|
||||
|
||||
# Append the icns file to the sources list so it will be a dependency to the
|
||||
# main target
|
||||
list(APPEND ${appsources} ${_outfilename}.icns)
|
||||
|
||||
# Install the icon into the Resources dir in the bundle
|
||||
set_source_files_properties(${_outfilename}.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
|
||||
else(_icon)
|
||||
# TODO - try to scale a non-128 icon...? Try to convert an SVG on the fly?
|
||||
message(STATUS "Unable to find an 128x128 icon that matches pattern ${pattern} for variable ${appsources} - application will not have an application icon!")
|
||||
endif(_icon)
|
||||
|
||||
else(SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE)
|
||||
message(STATUS "Unable to find the sips and tiff2icns utilities - application will not have an application icon!")
|
||||
endif(SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE)
|
||||
endif(APPLE)
|
||||
endmacro (TOMAHAWK_ADD_APP_ICON)
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
@ -50,12 +50,12 @@
|
||||
<file>data/images/starred.svg</file>
|
||||
<file>data/images/star-unstarred.svg</file>
|
||||
<file>data/images/apply-check.svg</file>
|
||||
<file>data/icons/tomahawk-icon-16x16.png</file>
|
||||
<file>data/icons/tomahawk-icon-32x32.png</file>
|
||||
<file>data/icons/tomahawk-icon-64x64.png</file>
|
||||
<file>data/icons/tomahawk-icon-128x128.png</file>
|
||||
<file>data/icons/tomahawk-icon-256x256.png</file>
|
||||
<file>data/icons/tomahawk-icon-512x512.png</file>
|
||||
<file alias="data/icons/tomahawk-icon-16x16.png">data/icons/16x16-tomahawk-icon.png</file>
|
||||
<file alias="data/icons/tomahawk-icon-32x32.png">data/icons/32x32-tomahawk-icon.png</file>
|
||||
<file alias="data/icons/tomahawk-icon-64x64.png">data/icons/64x64-tomahawk-icon.png</file>
|
||||
<file alias="data/icons/tomahawk-icon-128x128.png">data/icons/128x128-tomahawk-icon.png</file>
|
||||
<file alias="data/icons/tomahawk-icon-256x256.png">data/icons/256x256-tomahawk-icon.png</file>
|
||||
<file alias="data/icons/tomahawk-icon-512x512.png">data/icons/512x512-tomahawk-icon.png</file>
|
||||
<file>data/sql/dbmigrate-22_to_23.sql</file>
|
||||
<file>data/sql/dbmigrate-23_to_24.sql</file>
|
||||
<file>data/sql/dbmigrate-24_to_25.sql</file>
|
||||
@ -85,7 +85,7 @@
|
||||
<file>data/images/spotifycore-logo.png</file>
|
||||
<file>data/images/share.svg</file>
|
||||
<file>data/images/process-stop.svg</file>
|
||||
<file>data/icons/tomahawk-grayscale-icon-128x128.png</file>
|
||||
<file alias="data/icons/tomahawk-grayscale-icon-128x128.png">data/icons/128x128-tomahawk-grayscale-icon.png</file>
|
||||
<file>data/images/collection.svg</file>
|
||||
<file>data/misc/tomahawk_pubkey.pem</file>
|
||||
<file>data/images/jump-link.svg</file>
|
||||
@ -160,9 +160,9 @@
|
||||
<file>data/images/ipv6-logo.svg</file>
|
||||
<file>data/images/whatsnew.svg</file>
|
||||
<file>data/images/copy.svg</file>
|
||||
<file>data/icons/tomahawk-icon-1024x1024.png</file>
|
||||
<file alias="data/icons/tomahawk-icon-1024x1024.png">data/icons/1024x1024-tomahawk-icon.png</file>
|
||||
<file>data/images/plugins.svg</file>
|
||||
<file>data/icons/tomahawk-white-icon-128x128.png</file>
|
||||
<file alias="data/icons/tomahawk-white-icon-128x128.png">data/icons/128x128-tomahawk-white-icon.png</file>
|
||||
<file>data/images/repeat-all.svg</file>
|
||||
<file>data/images/repeat-one.svg</file>
|
||||
<file>data/images/downloads.svg</file>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file alias="tomahawk-icon.png">../../data/icons/tomahawk-icon-128x128.png</file>
|
||||
<file alias="tomahawk-icon.png">../../data/icons/128x128-tomahawk-icon.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -1,9 +1,6 @@
|
||||
PROJECT( tomahawk )
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
|
||||
|
||||
set(TOMAHAWK_APPLICATION_TARGET "tomahahawk-bin")
|
||||
|
||||
include( AddAppIconMacro )
|
||||
include( ECMAddAppIcon )
|
||||
|
||||
# SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
# SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
@ -148,7 +145,10 @@ IF( BUILD_GUI )
|
||||
qt_wrap_ui( tomahawkUI_H ${tomahawkUI} )
|
||||
ENDIF()
|
||||
|
||||
tomahawk_add_app_icon( tomahawkSources Tomahawk "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-*.png" )
|
||||
file( GLOB_RECURSE TOMAHAWK_ICONS "${CMAKE_SOURCE_DIR}/data/icons/*-tomahawk-icon.png" )
|
||||
|
||||
ecm_add_app_icon( tomahawkSources ICONS ${TOMAHAWK_ICONS} )
|
||||
|
||||
qt_add_resources( RC_SRCS "../../resources.qrc" )
|
||||
|
||||
SET( final_src ${final_src} ${tomahawkUI_H} ${tomahawkMoc} ${tomahawkSources} ${RC_SRCS} )
|
||||
|
@ -1,6 +1,6 @@
|
||||
ADD_DEFINITIONS( -DNOMINMAX )
|
||||
ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN )
|
||||
ADD_DEFINITIONS( -static-libgcc )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc" )
|
||||
ADD_DEFINITIONS( -DUNICODE )
|
||||
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
|
@ -1,4 +1,7 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
cmake_policy(SET CMP0020 OLD)
|
||||
|
||||
project(kdsingleapplicationguard)
|
||||
|
||||
list(APPEND kdsingleapplicationguard_INCLUDE_DIRECTORIES
|
||||
|
2
thirdparty/libcrashreporter-qt
vendored
@ -1 +1 @@
|
||||
Subproject commit e8fffe61e7c94ce88e59b80579754c4a46da65ea
|
||||
Subproject commit 0dc4a719ca98f3bf942a8e722478c8bf1b192cb4
|
@ -1,5 +1,7 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
project(qtcertificateaddon)
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
cmake_policy(SET CMP0020 OLD)
|
||||
|
||||
add_subdirectory( src )
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
PROJECT(libqxtweb-standalone)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
|
||||
|
||||
CMAKE_POLICY(SET CMP0020 OLD)
|
||||
|
||||
IF( ${CMAKE_VERSION} VERSION_GREATER 2.8.3 )
|
||||
CMAKE_POLICY(SET CMP0017 NEW)
|
||||
ENDIF( ${CMAKE_VERSION} VERSION_GREATER 2.8.3 )
|
||||
|