diff CMakeLists.txt @ 0:a55e39064a71

First commit of code that compiles. Does nothing like it should but has cmake goo to wrap dat files
author Daniel O'Connor <darius@dons.net.au>
date Mon, 29 Mar 2021 13:48:34 +1030
parents
children 0d653f60dec8
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CMakeLists.txt	Mon Mar 29 13:48:34 2021 +1030
@@ -0,0 +1,42 @@
+cmake_minimum_required(VERSION 3.12)
+
+# Change your executable name to something creative!
+set(NAME modulator)
+
+include(pico_sdk_import.cmake)
+include(local.cmake)
+
+# Gooey boilerplate
+project(${NAME} C CXX ASM)
+set(CMAKE_C_STANDARD 11)
+set(CMAKE_CXX_STANDARD 17)
+
+# Initialize the SDK
+pico_sdk_init()
+
+add_executable(${NAME}
+    modulator.c
+)
+
+pico_generate_pio_header(${NAME} ${CMAKE_CURRENT_LIST_DIR}/dac.pio)
+
+target_link_libraries(${NAME}
+		pico_stdlib
+		hardware_pio
+)
+
+bin2elf(${NAME} shaped-trap.dat)
+bin2elf(${NAME} sgauss.dat)
+
+# create map/bin/hex file etc.
+pico_add_extra_outputs(${NAME})
+
+# Set up files for the release packages
+install(FILES
+    ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.uf2
+    DESTINATION .
+)
+
+set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
+set(CPACK_GENERATOR "ZIP" "TGZ")
+include(CPack)