-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathCMakeLists.txt
62 lines (46 loc) · 1.87 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
# Copyright (C) 2018 Steven Hoving
#
# This program 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 3 of the License, or
# (at your option) any later version.
#
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.10)
project(CamStudio)
set(GTEST_CATCH_EXCEPTIONS 0)
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/dep/cmake"
)
include(CTest)
enable_testing()
find_package(InnoSetup)
if(NOT DEFINED MSVC OR MSVC_VERSION LESS 1915)
message(FATAL_ERROR "camstudio currently only builds with visual studio 2017 15.8 for now.")
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
#add_compile_options(/WX) # treat warnings as errors.
#add_compile_options(/permissive-) # vs conformance mode.
add_compile_options(/Zc:rvalueCast)
add_compile_options(/Zc:ternary)
add_compile_options(/Zc:referenceBinding)
add_compile_options(/W3)
###############################################################################
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install)
###############################################################################
add_subdirectory(dep)
add_subdirectory(src)
###############################################################################
if (INNOSETUP_COMPILER_FOUND)
include (CreateInnoSetup)
create_inno_setup()
endif()