-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
69 lines (55 loc) · 2.39 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
cmake_minimum_required(VERSION 3.4)
project(Swerve-Platform-Project)
# CMake options
# ==============================================================================
cmake_policy(SET CMP0069 NEW)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)
set(SDL_ATOMIC OFF CACHE INTERNAL "" FORCE)
set(SDL_AUDIO OFF CACHE INTERNAL "" FORCE)
set(SDL_VIDEO OFF CACHE INTERNAL "" FORCE)
set(SDL_RENDER OFF CACHE INTERNAL "" FORCE)
set(SDL_EVENTS ON CACHE INTERNAL "" FORCE)
set(SDL_JOYSTICK ON CACHE INTERNAL "" FORCE)
set(SDL_HAPTIC OFF CACHE INTERNAL "" FORCE)
set(SDL_HIDAPI OFF CACHE INTERNAL "" FORCE)
set(SDL_POWER OFF CACHE INTERNAL "" FORCE)
set(SDL_THREADS OFF CACHE INTERNAL "" FORCE)
set(SDL_TIMERS OFF CACHE INTERNAL "" FORCE)
set(SDL_FILE OFF CACHE INTERNAL "" FORCE)
set(SDL_LOADSO OFF CACHE INTERNAL "" FORCE)
set(SDL_CPUINFO OFF CACHE INTERNAL "" FORCE)
set(SDL_FILESYSTEM OFF CACHE INTERNAL "" FORCE)
set(SDL_DLOPEN OFF CACHE INTERNAL "" FORCE)
set(SDL_SENSOR OFF CACHE INTERNAL "" FORCE)
set(SDL_LOCALE OFF CACHE INTERNAL "" FORCE)
set(SDL_STATIC ON CACHE INTERNAL "" FORCE)
set(SDL_SHARED OFF CACHE INTERNAL "" FORCE)
# Compiler options
# ==============================================================================
# Use C++ 20
set(CMAKE_CXX_STANDARD 20)
# Compiler flags for C++
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
-Wall -Wextra \
-Wsuggest-override \
-Wno-register \
-Wno-missing-braces \
-Wno-unknown-pragmas \
-Wno-psabi \
-fdiagnostics-show-option \
-fconcepts")
# removed: -Werror
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/lib/raspberryPi)
# Output all binaries to the build/bin folder
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# # Google Test
# # ==============================================================================
# add_subdirectory(googletest EXCLUDE_FROM_ALL)
# include_directories(${gmock_SOURCE_DIR}/include)
# include_directories(${gtest_SOURCE_DIR}/include)
# include(GoogleTest)
# enable_testing()
add_subdirectory("src")