-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
82 lines (68 loc) · 2.37 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
#
# Copyright 2011 Kurtis L. Nusbaum
#
# This file is part of UDJ.
#
# UDJ is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# UDJ is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with UDJ. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 2.8.7)
PROJECT(UDJ)
include(VERSION.cmake)
SET(PROJECT_VERSION_MAJOR ${VERSION_MAJOR})
SET(PROJECT_VERSION_MINOR ${VERSION_MINOR})
SET(PROJECT_VERSION_PATCH ${VERSION_PATCH})
SET(PROJECT_COPYRIGHT_YEAR 2011)
SET(PROJECT_VERNDOR "Bazaar Solutions")
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
set(PROJECT_COPYRIGHT_YEAR "2011")
set(PROJECT_DOMAIN_FIRST "klnusbaum")
set(PROJECT_DOMAIN_SECOND "org")
set(PROJECT_DOMAIN "${PROJECT_DOMAIN_FIRST}.${PROJECT_DOMAIN_SECOND}")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
FIND_PACKAGE(Qt4 4.7.1
COMPONENTS QtMain QtCore QtGui QtSql QtNetwork QtXml REQUIRED)
FIND_PACKAGE(Phonon REQUIRED)
include_directories("${PHONON_INCLUDE_DIR}")
IF(WIN32)
FIND_LIBRARY(QTSPARKLE_LIBRARIES qtsparkle)
ENDIF(WIN32)
include(UseQt4)
include(UDJCPack.cmake)
SET(CMAKE_AUTOMOC TRUE)
FIND_LIBRARY(TAGLIB "tag" PATH)
IF(NOT TAGLIB)
MESSAGE(fatal_error "Could not find taglib")
ENDIF(NOT TAGLIB)
FIND_PATH(TAGLIB_HEADER_PATH "taglib/taglib.h" PATH)
IF(NOT TAGLIB_HEADER_PATH)
message(FATAL_ERROR "Couldn't find path to taglib header")
ENDIF(NOT TAGLIB_HEADER_PATH)
include_directories("${TAGLIB_HEADER_PATH}/taglib")
set(UDJ_DEBUG_BUILD FALSE CACHE BOOL "Enables/Disables a debug build of UDJ")
IF(UDJ_DEBUG_BUILD)
ADD_DEFINITIONS(-DUDJ_DEBUG_BUILD)
ENDIF(UDJ_DEBUG_BUILD)
set(HAS_CUSTOM_CA_CERT 0)
IF(CUSTOM_CA_CERT)
CONFIGURE_FILE(${CUSTOM_CA_CERT}
${PROJECT_BINARY_DIR}/serverca.pem COPYONLY)
set(HAS_CUSTOM_CA_CERT 1)
ENDIF(CUSTOM_CA_CERT)
set(IS_APPLE_BUILD 0)
set(IS_WINDOWS_BUILD 0)
IF(APPLE)
set(IS_APPLE_BUILD 1)
ELSEIF(WIN32)
set(IS_WINDOWS_BUILD 1)
ENDIF()
ADD_SUBDIRECTORY(src)