AdventOfCode/2024/CMakeLists.txt
2024-12-01 23:26:50 +01:00

19 lines
No EOL
552 B
CMake

add_library(2024 SHARED)
foreach(i RANGE 1 1)
set(out_path "${CMAKE_CURRENT_SOURCE_DIR}/src/include/day${i}_input.h")
add_custom_command(
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/include/day${i}_input.h"
COMMAND xxd -i input/day${i}.txt > src/include/day${i}_input.h
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
list(APPEND adv_input ${out_path})
endforeach()
add_custom_target(prebuild_target DEPENDS ${adv_input})
add_dependencies(2024 prebuild_target)
target_sources(2024
PRIVATE
src/day1.c
)