Skip to content

Commit 906116b

Browse files
authored
Merge pull request #3 from mwinters-stuff/main
Added LiquidCrystalIO library to cmake.
2 parents 8e37a73 + 9b6ef55 commit 906116b

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

cmakeProject/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
2+
13
cmake_minimum_required(VERSION 3.26)
24

35
include(pico_sdk_import.cmake)
@@ -22,4 +24,5 @@ IF(NOT DEFINED "ENV{TC_CMAKE_EXCLUDE_EXAMPLES}")
2224
add_subdirectory(nativeExamples/ControlAppOledKeyboardWifi)
2325
add_subdirectory(nativeExamples/UsingMatrixKeyboard)
2426
add_subdirectory(nativeExamples/UnicodeHandlerTest)
25-
ENDIF ()
27+
ENDIF ()
28+

cmakeProject/libraries.cmake

+11-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ include(FetchContent)
1111
# TcMenuLog
1212
# AdafruitGFXNativePort
1313
# SimpleCollections
14+
# LiquidCrystalIO
1415

1516

16-
#SET(TCMENU_BASE_GIT_REPO "https://github.com/mwinters-stuff")
17-
SET(TCMENU_BASE_GIT_REPO "https://github.com/TcMenu/")
17+
SET(TCMENU_BASE_GIT_REPO "https://github.com/TcMenu")
1818

1919
# Fetch the TcMenu git repo
2020
FetchContent_Declare(
@@ -64,6 +64,14 @@ FetchContent_Declare(
6464
SOURCE_SUBDIR cmake
6565
)
6666

67+
# Fetch the LiquidCrystalIO git repo
68+
FetchContent_Declare(
69+
LiquidCrystalIO
70+
GIT_REPOSITORY ${TCMENU_BASE_GIT_REPO}/LiquidCrystalIO.git
71+
GIT_TAG main # Use a stable branch, tag, or commit hash
72+
SOURCE_SUBDIR cmake
73+
)
74+
6775
# Fetch the SimpleCollections git repo
6876
FetchContent_Declare(
6977
SimpleCollections
@@ -72,6 +80,6 @@ FetchContent_Declare(
7280
SOURCE_SUBDIR cmake
7381
)
7482

75-
FetchContent_MakeAvailable(tcMenuLib IoAbstraction TaskManagerIO TcUnicodeHelper TcMenuLog AdafruitGFX SimpleCollections)
83+
FetchContent_MakeAvailable(tcMenuLib IoAbstraction TaskManagerIO TcUnicodeHelper TcMenuLog AdafruitGFX SimpleCollections LiquidCrystalIO)
7684

7785
endfunction()

cmakeProject/pico_sdk_import.cmake

+13-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,20 @@ if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_P
1818
message("Using PICO_SDK_FETCH_FROM_GIT_PATH from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')")
1919
endif ()
2020

21+
if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_TAG} AND (NOT PICO_SDK_FETCH_FROM_GIT_TAG))
22+
set(PICO_SDK_FETCH_FROM_GIT_TAG $ENV{PICO_SDK_FETCH_FROM_GIT_TAG})
23+
message("Using PICO_SDK_FETCH_FROM_GIT_TAG from environment ('${PICO_SDK_FETCH_FROM_GIT_TAG}')")
24+
endif ()
25+
26+
if (PICO_SDK_FETCH_FROM_GIT AND NOT PICO_SDK_FETCH_FROM_GIT_TAG)
27+
set(PICO_SDK_FETCH_FROM_GIT_TAG "master")
28+
message("Using master as default value for PICO_SDK_FETCH_FROM_GIT_TAG")
29+
endif()
30+
2131
set(PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the Raspberry Pi Pico SDK")
2232
set(PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT}" CACHE BOOL "Set to ON to fetch copy of SDK from git if not otherwise locatable")
2333
set(PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH}" CACHE FILEPATH "location to download SDK")
34+
set(PICO_SDK_FETCH_FROM_GIT_TAG "${PICO_SDK_FETCH_FROM_GIT_TAG}" CACHE FILEPATH "release tag for SDK")
2435

2536
if (NOT PICO_SDK_PATH)
2637
if (PICO_SDK_FETCH_FROM_GIT)
@@ -34,14 +45,14 @@ if (NOT PICO_SDK_PATH)
3445
FetchContent_Declare(
3546
pico_sdk
3647
GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
37-
GIT_TAG master
48+
GIT_TAG ${PICO_SDK_FETCH_FROM_GIT_TAG}
3849
GIT_SUBMODULES_RECURSE FALSE
3950
)
4051
else ()
4152
FetchContent_Declare(
4253
pico_sdk
4354
GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
44-
GIT_TAG master
55+
GIT_TAG ${PICO_SDK_FETCH_FROM_GIT_TAG}
4556
)
4657
endif ()
4758

0 commit comments

Comments
 (0)