-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
39 lines (33 loc) · 1.29 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
# This file arbitrates between different methods of building.
cmake_minimum_required(VERSION 3.13)
if(DEFINED IDF_TARGET)
# ESP-IDF detected (by IDF_TARGET being defined).
message(STATUS "Building PAX Graphics as ESP-IDF module.")
include(${CMAKE_CURRENT_LIST_DIR}/esp_idf.cmake)
elseif(DEFINED PICO_SDK_PATH)
# Pi Pico SDK detected (by PICO_SDK_PATH being defined).
project(pax_graphics C CXX)
message(STATUS "Building PAX Graphics for Pi Pico SDK.")
add_definitions(-DPAX_STANDALONE=0)
add_definitions(-DPAX_COMPILE_MCR=0)
add_definitions(-DPAX_PI_PICO=1)
include(${CMAKE_CURRENT_LIST_DIR}/standalone.cmake)
elseif(DEFINED ENV{PAX_CMAKE_STANDALONE})
# Explicitly named SDK.
set(CMAKE_C_COMPILER_FORCED true)
set(CMAKE_CXX_COMPILER_FORCED true)
project(pax_graphics C CXX)
add_definitions(-DPAX_STANDALONE=1)
add_definitions(-DPAX_COMPILE_MCR=0)
message(STATUS "Building PAX Graphics for " $ENV{PAX_CMAKE_STANDALONE} ".")
include(${CMAKE_CURRENT_LIST_DIR}/standalone.cmake)
else()
# Unknown SDK.
set(CMAKE_C_COMPILER_FORCED true)
set(CMAKE_CXX_COMPILER_FORCED true)
project(pax_graphics C CXX)
add_definitions(-DPAX_STANDALONE=1)
add_definitions(-DPAX_COMPILE_MCR=0)
message(STATUS "Building PAX Graphics (unknown SDK).")
include(${CMAKE_CURRENT_LIST_DIR}/standalone.cmake)
endif()