forked from ducalex/retro-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.cmake
More file actions
29 lines (24 loc) · 883 Bytes
/
base.cmake
File metadata and controls
29 lines (24 loc) · 883 Bytes
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
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/components")
set(SDKCONFIG_DEFAULTS "${CMAKE_CURRENT_LIST_DIR}/base.sdkconfig")
macro(rg_setup_compile_options)
set(RG_TARGET "RG_TARGET_$ENV{RG_TARGET}")
message("Target: ${RG_TARGET}")
component_compile_options(
-DRG_REPLACE_PRINTF_FUNCTIONS
-D${RG_TARGET}
-DRETRO_GO
${ARGV}
)
if(NOT ";${ARGV};" MATCHES ";-O[0123gs];")
# Only default to -O3 if not specified by the app
component_compile_options(-O3)
endif()
if($ENV{ENABLE_PROFILING})
# Still debating whether -fno-inline is necessary or not...
component_compile_options(-DENABLE_PROFILING -finstrument-functions)
endif()
if($ENV{ENABLE_NETPLAY})
component_compile_options(-DENABLE_NETPLAY)
endif()
endmacro()