summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..89b60e6
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Dependencies
+# Keypad
+add_library(pico-keypad ../libs/pico-keypad/src/keypad.cpp)
+target_link_libraries(pico-keypad PUBLIC pico_stdlib hardware_gpio)
+target_include_directories(pico-keypad INTERFACE ../libs/pico-keypad/src)
+target_include_directories(pico-keypad PUBLIC ../libs/pico-keypad/src)
+# I2C LCD
+add_library(Pico-I2C-LCD ../libs/Pico-I2C-LCD/LCD_I2C.cpp)
+target_link_libraries(Pico-I2C-LCD PUBLIC pico_stdlib hardware_i2c)
+target_include_directories(Pico-I2C-LCD INTERFACE ../libs/Pico-I2C-LCD/)
+target_include_directories(Pico-I2C-LCD PUBLIC ../libs/Pico-I2C-LCD/)
+
+# Main executable
+add_executable(pico-calc pico-calc.cpp calculator.cpp tokenizer.cpp)
+target_link_libraries(pico-calc
+ hardware_i2c Pico-I2C-LCD pico-keypad hardware_timer)
+target_include_directories(pico-calc PUBLIC include exceptions)