-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
179 lines (138 loc) · 4.82 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# Mininum required CMake version
cmake_minimum_required(VERSION 2.6)
# CMake policy
cmake_policy(VERSION 2.6.3)
project(quarkplayer)
# Add options values
include(Options.cmake)
# OWBuild
include(CMakeLists-owbuild.txt)
# Global variables about QuarkPlayer
set(QUARKPLAYER_NAME "QuarkPlayer")
set(QUARKPLAYER_MAJOR_VERSION 0)
set(QUARKPLAYER_MINOR_VERSION 2)
set(QUARKPLAYER_PATCH_VERSION 5)
set(QUARKPLAYER_VERSION
${QUARKPLAYER_MAJOR_VERSION}.${QUARKPLAYER_MINOR_VERSION}.${QUARKPLAYER_PATCH_VERSION}
)
if (WIN32)
set(QUARKPLAYER_BINARY_NAME quarkplayer.exe)
endif (WIN32)
#set(QUARKPLAYER_SVN_REPOSITORY "http://phonon-vlc-mplayer.googlecode.com/svn/trunk/")
set(QUARKPLAYER_DESCRIPTION_SUMMARY "QuarkPlayer, a Phonon media player")
set(QUARKPLAYER_DESCRIPTION
" QuarkPlayer is a multimedia application that plays your music and videos.
QuarkPlayer can use different backends (DirectShow, MPlayer, Xine,
GStreamer, VLC...) thanks to Qt and the Phonon library.
It also relies on an advanced plugin system and is available under Windows,
Linux and soon Mac OS X."
)
set(QUARKPLAYER_AUTHORS "QuarkPlayer Team")
set(QUARKPLAYER_URL "http://phonon-vlc-mplayer.googlecode.com/")
set(QUARKPLAYER_COPYRIGHT "Copyright (C) 2008-2009 Tanguy Krotoff")
set(QUARKPLAYER_LICENSE_FILE ${CMAKE_SOURCE_DIR}/COPYING)
set(QUARKPLAYER_PACKAGE_FILE quarkplayer-${QUARKPLAYER_VERSION}-rev${SVN_REVISION}-${BUILD_NAME})
set(QUARKPLAYER_SOURCE_PACKAGE_FILE quarkplayer-${QUARKPLAYER_VERSION}-rev${SVN_REVISION}-src)
set(QUARKPLAYER_PACKAGE_AUTHORS ${QUARKPLAYER_AUTHORS})
##
# RPATH handling, see http://www.vtk.org/Wiki/CMake_RPATH_handling
# Make quarkplayer working with the targets install, deb and rpm
set(CMAKE_INSTALL_RPATH .;/usr/lib/quarkplayer)
#svn_export(${QUARKPLAYER_SVN_REPOSITORY} ${CMAKE_BINARY_DIR}/quarkplayer-svn-export)
# CMake declarations order matters!
# Default installation path
# and other platform specific installation instructions
set(CMAKE_INSTALL_PREFIX ${BUILD_DIR})
if (WIN32)
include(CMakeLists-win32.txt)
endif (WIN32)
if (LINUX)
include(CMakeLists-linux.txt)
endif (LINUX)
if (APPLE)
include(CMakeLists-macos.txt)
endif (APPLE)
##
# 3rdparty libraries with no Qt dependency
if (WIN32)
add_subdirectory(quarkplayer-plugins/wincontextmenu)
endif (WIN32)
if (ZLIB)
add_subdirectory(3rdparty/zlib)
set(ZLIB_FOUND 1)
set(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/zlib)
set(ZLIB_LIBRARY zlib)
endif (ZLIB)
add_subdirectory(3rdparty/hmac)
# minizip
add_subdirectory(3rdparty/zlib/contrib/minizip)
set(MINIZIP_FOUND 1)
set(MINIZIP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/zlib/contrib/minizip)
set(MINIZIP_LIBRARY minizip)
##
if (MEDIAINFOLIB)
add_subdirectory(3rdparty/ZenLib)
add_subdirectory(3rdparty/MediaInfo)
endif (MEDIAINFOLIB)
if (TAGLIB)
add_subdirectory(3rdparty/taglib)
endif (TAGLIB)
##
# Qt/KDE libraries detection and initialization
if (NOT ENV{KDEDIRS})
#Ubuntu 8.04, if GNOME is runnng instead of KDE, KDEDIRS variable is not defined
#so let's define it
set(ENV{KDEDIRS} /usr/lib/kde4)
endif (NOT ENV{KDEDIRS})
# Disable KDE4 integration since it gives some troubles
# will be changed in the future
# cf http://code.google.com/p/phonon-vlc-mplayer/issues/detail?id=2
#find_package(KDE4)
if (KDE4_FOUND)
#include(KDE4Defaults)
#include(MacroLibrary)
add_definitions(${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
else (KDE4_FOUND)
set(QT_MIN_VERSION 4.4.0)
find_package(Qt4 REQUIRED)
# Includes all wanted definitions for Qt
include(${QT_USE_FILE})
# Ok, we can set NEW_TITLE_CHAPTER_HANDLING as we have a patched Phonon library
set(NEW_TITLE_CHAPTER_HANDLING 1)
message(STATUS "KDE4 support disabled")
endif (KDE4_FOUND)
message(STATUS "Qt Directory: ${QT_BINARY_DIR}")
# Optimization: remove all Qt modules from include path
reduce_qt_include_dirs()
##
# 3rdparty libraries with Qt dependency
add_subdirectory(3rdparty/quazip)
add_subdirectory(3rdparty/modeltest)
add_subdirectory(3rdparty/qtsingleapplication)
##
# 3rdparty libraries with Qt and Phonon dependency
add_subdirectory(3rdparty/phonon)
# Do not use Phonon from Qt or KDE4
# Use Phonon from this repository instead (patched version)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty)
set(QT_PHONON_LIBRARY phonon)
add_subdirectory(phonon-mplayer)
##
# QuarkPlayer
clear_qt_translations()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libs)
add_subdirectory(libs)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(quarkplayer)
add_subdirectory(quarkplayer/style)
add_subdirectory(quarkplayer-plugins)
add_subdirectory(quarkplayer-app)
##
# Tests (includes unit tests)
add_subdirectory(tests)
##
# Packaging (NSIS, RPM, Debian, src.tar.gz)
add_subdirectory(packaging)
# CPack instructions
include(CPackConfig.txt)