diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-11-27 12:51:24 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-11-27 13:04:00 -0700 |
commit | fcb936b4ea13841e8c4f87648182b20a194413f2 (patch) | |
tree | 11ba2cf223e2efe5c5f2b4c4f1192560631ddf89 /cmake | |
parent | 22c5b3e1dc4e3cf7de3f73ebbf5b59542f207f4b (diff) | |
download | ch573-fcb936b4ea13841e8c4f87648182b20a194413f2.tar.gz ch573-fcb936b4ea13841e8c4f87648182b20a194413f2.tar.bz2 ch573-fcb936b4ea13841e8c4f87648182b20a194413f2.zip |
Some SPI is working, a bit. Still no clock, but I'm about to give up on that.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/fiddle.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/fiddle.cmake b/cmake/fiddle.cmake index 6b151a2..6830ce5 100644 --- a/cmake/fiddle.cmake +++ b/cmake/fiddle.cmake @@ -1,3 +1,11 @@ +find_program(FIDDLEC "fiddlec") + +if (FIDDLEC) + message (STATUS "Found fiddlec at ${FIDDLEC}") +else() + message (FATAL_ERROR "Could not find fiddlec. Please download and build it at git@git.josher.dev:fiddle.git") +endif() + function(add_fiddle_source header_out fdl_file) get_filename_component(dir_path ${fdl_file} DIRECTORY) get_filename_component(file_name_without_extension ${fdl_file} NAME_WE) @@ -13,7 +21,7 @@ function(add_fiddle_source header_out fdl_file) DEPENDS ${fdl_file} COMMENT "Fiddle compile ${fdl_file} -> ${output_header}" COMMAND ${CMAKE_COMMAND} -E make_directory "${output_dir}" - COMMAND fiddlec -Lc -h ${output_header} -I ${CMAKE_SOURCE_DIR}/fdl/ --intf-dir ${CMAKE_BINARY_DIR}/fdli/ ${CMAKE_SOURCE_DIR}/${fdl_file} + COMMAND ${FIDDLEC} -Lc -h ${output_header} -I ${CMAKE_SOURCE_DIR}/fdl/ --intf-dir ${CMAKE_BINARY_DIR}/fdli/ ${CMAKE_SOURCE_DIR}/${fdl_file} ) # Make the output header file available as a source file for the target |