-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
71 lines (59 loc) · 2.04 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
#============================================================================
# @file CMakeLists.txt
# @brief CMake Liste zur Erstellung des EagleEye-Projektes
#
# Diese CMake Liste uebernimmt die Konfiguration zur Erstellungen der
# einzelnen Programmen des EagleEye-Projektes.
#
# @author : Sebastian Hollermann
#============================================================================
cmake_minimum_required (VERSION 2.8.11)
project (EagleEye)
# Optionen
# Doxygen
OPTION(WITH_DOXYGEN "Dokumentation generieren" OFF)
# Client erstellen
OPTION(CLIENT "Client erstellen" OFF)
# Transmission Service erstellen
OPTION(SERVICE "Transmission-Service erstellen" OFF)
OPTION(SERVER "Server erstellen lassen" OFF)
# Wenn Alle Optionen aus sind alle auf Anstellen
IF(NOT ${CLIENT} AND NOT ${SERVICE} AND NOT ${SERVER})
set(CLIENT ON)
set(SERVICE ON)
set(SERVER ON)
ENDIF()
# Installationsverzeichnis setzen
set(Install_Dir ${PROJECT_SOURCE_DIR}/bin)
# Client Verzeichnis
if(${CLIENT})
# GUI-Elemente sowie Network von Qt5 sind Vorraussetzung
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Network REQUIRED)
add_subdirectory(Client)
endif()
# Server Verzeichnis
if(${SERVER})
# OpenCV sowie die GUI-Elemente von Qt5 sind Vorraussetzung
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(OpenCV REQUIRED)
add_subdirectory(Server)
endif()
# Transmission-Service Verzeichnis
if(${SERVICE})
# PThreads suchen, ist Vorraussetzung
find_package(Threads REQUIRED)
add_subdirectory(Transmission_Service)
endif()
# Doxygen Erstellung
if(${WITH_DOXYGEN})
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generating API documentation with Doxygen" VERBATIM)
endif(DOXYGEN_FOUND)
endif()