aboutsummaryrefslogtreecommitdiff
path: root/cmake/fiddle.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/fiddle.cmake')
-rw-r--r--cmake/fiddle.cmake10
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