Make CMakeLists cross-platform between macOS/Linux
This commit is contained in:
@@ -6,19 +6,31 @@ set(CMAKE_C_STANDARD 11)
|
|||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
# Enforce board type
|
# Enforce board type
|
||||||
set(PICO_BOARD "ADAFRUIT_FEATHER_RP2040")
|
set(PICO_BOARD "adafruit_feather_rp2040")
|
||||||
|
|
||||||
|
# Determine current platform
|
||||||
|
if (APPLE)
|
||||||
|
set(HomeLocation "/Users")
|
||||||
|
elseif (UNIX AND NOT APPLE)
|
||||||
|
set(HomeLocation "/home")
|
||||||
|
endif()
|
||||||
|
message(HomeLocation="${HomeLocation}")
|
||||||
|
|
||||||
# Initialise pico_sdk from installed location
|
# Initialise pico_sdk from installed location
|
||||||
# (note this can come from environment, CMake cache etc)
|
# (note this can come from environment, CMake cache etc)
|
||||||
set(PICO_SDK_PATH "/Users/mchapman/source/pico/pico-sdk")
|
set(PICO_SDK_PATH "${HomeLocation}/mchapman/source/pico/pico-sdk")
|
||||||
|
|
||||||
|
# Initialize adafruit arduino library locations
|
||||||
|
set(GfxLibLocation "${HomeLocation}/mchapman/source/pico-arduino-compat/libs/adafruit-gfx-library")
|
||||||
|
set(Sh110xLibLocation "${HomeLocation}/mchapman/source/pico-arduino-compat/libs/adafruit-sh110x")
|
||||||
|
|
||||||
# Pull in Raspberry Pi Pico SDK (must be before project)
|
# Pull in Raspberry Pi Pico SDK (must be before project)
|
||||||
include(pico_sdk_import.cmake)
|
include(pico_sdk_import.cmake)
|
||||||
|
|
||||||
project(traegerController C CXX ASM)
|
project(traegerController C CXX ASM)
|
||||||
|
|
||||||
add_subdirectory(/Users/mchapman/source/pico-arduino-compat/libs/adafruit-gfx-library pac-adafruit-gfx-library)
|
add_subdirectory(${GfxLibLocation} pac-adafruit-gfx-library)
|
||||||
add_subdirectory(/Users/mchapman/source/pico-arduino-compat/libs/adafruit-sh110x pac-adafruit-sh110x)
|
add_subdirectory(${Sh110xLibLocation} pac-adafruit-sh110x)
|
||||||
|
|
||||||
# Initialise the Raspberry Pi Pico SDK
|
# Initialise the Raspberry Pi Pico SDK
|
||||||
pico_sdk_init()
|
pico_sdk_init()
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
# This is a generated file and its contents are an internal implementation detail.
|
|
||||||
# The download step will be re-executed if anything in this file changes.
|
|
||||||
# No other meaning or use of this file is supported.
|
|
||||||
|
|
||||||
method=source_dir
|
|
||||||
command=
|
|
||||||
source_dir=/Users/mchapman/source/pico/pico-sdk/tools/elf2uf2
|
|
||||||
work_dir=
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
||||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.5)
|
|
||||||
|
|
||||||
file(MAKE_DIRECTORY
|
|
||||||
"/Users/mchapman/source/pico/pico-sdk/tools/elf2uf2"
|
|
||||||
"/Users/mchapman/source/traegerController/build/elf2uf2"
|
|
||||||
"/Users/mchapman/source/traegerController/build/elf2uf2"
|
|
||||||
"/Users/mchapman/source/traegerController/build/elf2uf2/tmp"
|
|
||||||
"/Users/mchapman/source/traegerController/build/elf2uf2/src/ELF2UF2Build-stamp"
|
|
||||||
"/Users/mchapman/source/traegerController/build/elf2uf2/src"
|
|
||||||
"/Users/mchapman/source/traegerController/build/elf2uf2/src/ELF2UF2Build-stamp"
|
|
||||||
)
|
|
||||||
|
|
||||||
set(configSubDirs )
|
|
||||||
foreach(subDir IN LISTS configSubDirs)
|
|
||||||
file(MAKE_DIRECTORY "/Users/mchapman/source/traegerController/build/elf2uf2/src/ELF2UF2Build-stamp/${subDir}")
|
|
||||||
endforeach()
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// AUTOGENERATED FROM PICO_CONFIG_HEADER_FILES and then PICO_<PLATFORM>_CONFIG_HEADER_FILES
|
|
||||||
// DO NOT EDIT!
|
|
||||||
|
|
||||||
|
|
||||||
// based on PICO_CONFIG_HEADER_FILES:
|
|
||||||
|
|
||||||
#include "/Users/mchapman/source/pico/pico-sdk/src/boards/include/boards/ADAFRUIT_FEATHER_RP2040.h"
|
|
||||||
|
|
||||||
// based on PICO_RP2040_CONFIG_HEADER_FILES:
|
|
||||||
|
|
||||||
#include "/Users/mchapman/source/pico/pico-sdk/src/rp2_common/cmsis/include/cmsis/rename_exceptions.h"
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ---------------------------------------
|
|
||||||
// THIS FILE IS AUTOGENERATED; DO NOT EDIT
|
|
||||||
// ---------------------------------------
|
|
||||||
|
|
||||||
#ifndef _PICO_VERSION_H
|
|
||||||
#define _PICO_VERSION_H
|
|
||||||
|
|
||||||
#define PICO_SDK_VERSION_MAJOR 1
|
|
||||||
#define PICO_SDK_VERSION_MINOR 3
|
|
||||||
#define PICO_SDK_VERSION_REVISION 1
|
|
||||||
#define PICO_SDK_VERSION_STRING "1.3.1"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Reference in New Issue
Block a user