-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
104 lines (84 loc) · 2.71 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
cmake_minimum_required(VERSION 2.6)
project(hamlog)
set(CMAKE_MODULE_PATH "cmake_modules")
set(sqlite3_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
find_package(sqlite3)
set(Boost_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
find_package(Boost COMPONENTS date_time system filesystem program_options regex signals REQUIRED)
set(tinyxml_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
find_package(tinyxml)
set(log4cxx_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
find_package(log4cxx)
set(hamlib_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
find_package(hamlib)
find_package(Doxygen)
INCLUDE(FindQt4)
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui)
# ADD_DEFINITIONS(${SWIFTEN_CFLAGS})
message(" Supported features")
message("-----------------------")
if (SQLITE3_FOUND)
ADD_DEFINITIONS(-DWITH_SQLITE)
include_directories(SQLITE3_INCLUDE_DIR)
message("SQLite3 : yes")
else (SQLITE3_FOUND)
set(SQLITE3_LIBRARIES "")
message("SQLite3 : no")
endif (SQLITE3_FOUND)
if(CMAKE_BUILD_TYPE MATCHES Debug)
ADD_DEFINITIONS(-O0)
ADD_DEFINITIONS(-ggdb)
ADD_DEFINITIONS(-DDEBUG)
ADD_DEFINITIONS(-Wall)
ADD_DEFINITIONS(-W)
ADD_DEFINITIONS(-Wcast-align)
ADD_DEFINITIONS(-Wextra -Wno-sign-compare -Wno-unused-parameter)
ADD_DEFINITIONS(-Winit-self)
ADD_DEFINITIONS(-Wmissing-declarations)
ADD_DEFINITIONS(-Wpointer-arith)
# ADD_DEFINITIONS(-Wreorder)
# ADD_DEFINITIONS(-Woverloaded-virtual)
# ADD_DEFINITIONS(-Wsign-promo)
ADD_DEFINITIONS(-Wundef -Wunused)
message("Debug : yes")
else(CMAKE_BUILD_TYPE MATCHES Debug)
message("Debug : no (run \"cmake . -DCMAKE_BUILD_TYPE=Debug\")")
endif(CMAKE_BUILD_TYPE MATCHES Debug)
if (TINYXML_FOUND)
ADD_DEFINITIONS(-DWITH_TINYXML)
include_directories(TINYXML_INCLUDE_DIR)
message("QRZ support : yes")
else (TINYXML_FOUND)
set(TINYXML_LIBRARIES "")
message("QRZ support : no (install tinyxml-devel)")
endif (TINYXML_FOUND)
if (HAMLIB_FOUND)
ADD_DEFINITIONS(-DWITH_HAMLIB)
include_directories(HAMLIB_INCLUDE_DIR)
message("Hamlib support : yes")
else ()
set(TINYXML_LIBRARIES "")
message("Hamlib support : no (install hamlib-devel)")
endif ()
if (LOG4CXX_FOUND)
ADD_DEFINITIONS(-DWITH_LOG4CXX)
include_directories(${LOG4CXX_INCLUDE_DIR})
message("Logging to file : yes")
else()
set(LOG4CXX_LIBRARIES "")
message("Logging to file : no (install log4cxx-devel)")
endif()
SET(HAMLOG_VERSION 1.0)
SET(PROJECT_VERSION 1.0)
include_directories(${Boost_INCLUDE_DIRS})
include_directories(library)
ADD_SUBDIRECTORY(ui)
ADD_SUBDIRECTORY(library)
ADD_SUBDIRECTORY(server)
if(DOXYGEN_FOUND)
message("Docs : yes")
ADD_SUBDIRECTORY(docs)
else(DOXYGEN_FOUND)
message("Docs : no (install doxygen)")
endif(DOXYGEN_FOUND)
message("----------------------")