-
Notifications
You must be signed in to change notification settings - Fork 26
/
CMakeLists.txt
56 lines (43 loc) · 1.11 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
cmake_minimum_required(VERSION 3.5)
project(rcssmonitor VERSION 19.0.1)
if(CMAKE_VERSION VERSION_LESS "3.7.0")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()
# compiler options
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()
include(GNUInstallDirs)
# check header files
include(CheckIncludeFileCXX)
if(WIN32)
check_include_file("windows.h" HAVE_WINDOWS_H)
endif()
check_include_file_cxx("arpa/inet.h" HAVE_ARPA_INET_H)
# check boost
#find_package(Boost 1.38.0 COMPONENTS program_options system REQUIRED)
#if(Boost_PROGRAM_OPTIONS_FOUND)
# set(HAVE_BOOST_PROGRAM_OPTIONS TRUE)
#endif()
# check Qt
find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED)
if(NOT Qt5_FOUND)
message(FATAL_ERROR "Qt5 not found!")
endif()
set(CMAKE_AUTOMOC ON)
# check zlib
find_package(ZLIB)
if(ZLIB_FOUND)
set(HAVE_LIBZ TRUE)
endif()
# generate config.h
add_definitions(-DHAVE_CONFIG_H)
configure_file(
${PROJECT_SOURCE_DIR}/cmake-config.h.in
${PROJECT_BINARY_DIR}/config.h
)
#
add_subdirectory(rcss)
add_subdirectory(src)