forked from ducalex/retro-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.cmake
29 lines (24 loc) · 895 Bytes
/
base.cmake
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")
macro(rg_setup_compile_options)
set(RG_TARGET "RG_TARGET_${RG_BUILD_TARGET}")
message("Target: ${RG_TARGET}")
component_compile_options(
-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(RG_ENABLE_NETPLAY)
component_compile_options(-DRG_ENABLE_NETWORKING -DRG_ENABLE_NETPLAY)
elseif(RG_ENABLE_NETWORKING)
component_compile_options(-DRG_ENABLE_NETWORKING)
endif()
if(RG_ENABLE_PROFILING)
# Still debating whether -fno-inline is necessary or not...
component_compile_options(-DRG_ENABLE_PROFILING -finstrument-functions)
endif()
endmacro()