From 50b24870ab66bac97c75f9d894ad015025d2aa16 Mon Sep 17 00:00:00 2001 From: Evan Voyles Date: Mon, 9 Dec 2024 03:07:49 +0100 Subject: [PATCH] Playing with a new binary --- demo/d_functional.c | 2 +- src/CMakeLists.txt | 30 +++++++++++++++++++----------- src/mandelbrot.c | 16 ++++++++++++++++ 3 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 src/mandelbrot.c diff --git a/demo/d_functional.c b/demo/d_functional.c index 594d945..2bfcb87 100644 --- a/demo/d_functional.c +++ b/demo/d_functional.c @@ -28,4 +28,4 @@ int main() { return 0; -} \ No newline at end of file +} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 950d439..8e1b943 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,15 +1,23 @@ -if (${FFMPEG_FOUND}) +set(EXECUTABLES avi2mp4 hello_ejovo mandelbrot) - add_executable(avi2mp4 avi2mp4.c) - add_executable(hello_ejovo hello_ejovo.c) - target_link_directories(avi2mp4 PUBLIC ${INC}) - target_link_directories(hello_ejovo PUBLIC ${INC}) - target_link_libraries(hello_ejovo ejovo) - target_link_libraries(avi2mp4 ejovo) - install( - TARGETS avi2mp4 hello_ejovo - DESTINATION ${CMAKE_INSTALL_PREFIX}/bin - ) +macro(add_ejovo_executable prog_name src_file) + add_executable(${prog_name} ${src_file}) + target_link_directories(${prog_name} PUBLIC ${INC}) + target_link_libraries(${prog_name} ejovo) +endmacro() + +foreach(PROG ${EXECUTABLES}) + add_ejovo_executable(${PROG} "${PROG}.c") +endforeach() + +if(${FFMPEG_FOUND}) + + # add_executable(avi2mp4 avi2mp4.c) add_executable(hello_ejovo hello_ejovo.c) + # target_link_directories(avi2mp4 PUBLIC ${INC}) + # target_link_directories(hello_ejovo PUBLIC ${INC}) + # target_link_libraries(hello_ejovo ejovo) target_link_libraries(avi2mp4 + # ejovo) + install(TARGETS ${EXECUTABLES} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) endif() diff --git a/src/mandelbrot.c b/src/mandelbrot.c new file mode 100644 index 0000000..f836f12 --- /dev/null +++ b/src/mandelbrot.c @@ -0,0 +1,16 @@ +/** + * @file mandelbrot.c + * @brief Generate the mandelbro set using a matrix, then output a png file + */ + +#include "matrix_gen.h" + +int main() { + + printf("Hello mandelbrot!"); + + + + +} +