-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
44 lines (34 loc) · 1.05 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
cmake_minimum_required(VERSION 3.19)
# set project
project(coco-loop)
# configure languages
enable_language(CXX)
set(CMAKE_CXX_STANDARD 20)
# build type
message("*** Type: ${CMAKE_BUILD_TYPE}${CMAKE_CONFIGURATION_TYPES}")
add_compile_definitions($<$<CONFIG:Debug>:DEBUG>)
# compiler
message("*** Compiler: ${CMAKE_CXX_COMPILER_ID}")
message("*** Crosscompiling: ${CMAKE_CROSSCOMPILING}")
# enable address sanitizer
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
# debug
#set(CMAKE_CXX_FLAGS_RELEASE "-g -Og")
#set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "ON" FORCE)
# platform
#message("*** OS: ${OS}")
message("*** Platform: ${PLATFORM}")
# dependencies
find_package(coco CONFIG)
if(${PLATFORM} STREQUAL "emu")
find_package(coco-font CONFIG)
find_package(glfw3 CONFIG)
endif()
find_package(coco-devboards CONFIG)
#foreach(BOARD ${coco-devboards_COMPONENT_NAMES})
# message("*** Board: ${BOARD}")
#endforeach()
add_subdirectory(coco)
# test executables
add_subdirectory(test)