-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
61 lines (50 loc) · 1.33 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
cmake_minimum_required(VERSION 2.8)
project(game_monitor)
if(CMAME_COMPILER_IS_GNUCXX)
add_definitions(-std=c++11)
endif()
set(CMAKE_CXX_STANDARD 11)
set(SRCS
src/interface.cpp
src/interface.h
src/log_writer.cpp
src/log_writer.h
src/main.cpp
src/pos_types.h
src/udp_thread.cpp
src/udp_thread.h
src/capture.cpp
src/capture.h
)
set(MOC_HEADERS
src/interface.h
src/udp_thread.h
src/capture.h
)
include(FindSDL)
find_package(SDL REQUIRED)
if(NOT_SDL_FOUND)
message(FATAL ERROR "SDL not found!!!")
endif(NOT_SDL_FOUND)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5Multimedia REQUIRED)
find_package(Qt5MultimediaWidgets REQUIRED)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(QT_USE_QTMAIN true)
set(QT_USE_QTGUI true)
set(QT_USE_QTNETWORK true)
set(QT_USE_QTOPENGL true)
set(QT_USE_QTMULTIMEDIA true)
add_definitions(${QT_DEFINITIONS})
include_directories(${CMAKE_BINARY_DIR})
set(CMAKE_BUILD_TYPE Debug)
include_directories(src)
add_executable(game_monitor ${SRCS} ${MOC_SRCS} ${RES_SORUCES})
target_link_libraries(game_monitor ${QT_LIBRARIES})
target_link_libraries(game_monitor Qt5::Widgets)
target_link_libraries(game_monitor Qt5::Network)
target_link_libraries(game_monitor Qt5::Multimedia)
target_link_libraries(game_monitor Qt5::MultimediaWidgets)