banan-os/userspace/aoc2023/CMakeLists.txt

33 lines
767 B
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.26)
project(aoc2023 CXX)
set(AOC2023_PROJECTS
day1
day2
day3
2023-12-04 17:51:27 +02:00
day4
2023-12-05 09:13:13 +02:00
day5
2023-12-06 07:27:25 +02:00
day6
2023-12-07 07:56:56 +02:00
day7
day8
)
2023-12-01 12:37:09 +02:00
set(BANAN_AOC2023_BIN ${BANAN_BIN}/aoc2023)
set(BANAN_AOC2023_INPUT ${BANAN_SHARE}/aoc2023)
add_custom_target(aoc2023)
2023-12-01 12:37:09 +02:00
add_custom_target(aoc2023_always
COMMAND ${CMAKE_COMMAND} -E make_directory ${BANAN_AOC2023_BIN}
COMMAND ${CMAKE_COMMAND} -E make_directory ${BANAN_AOC2023_INPUT}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/input/* ${BANAN_AOC2023_INPUT}/
)
add_custom_target(aoc2023-install DEPENDS aoc2023 aoc2023_always)
foreach(AOC2023_PROJECT ${AOC2023_PROJECTS})
2023-12-01 12:37:09 +02:00
add_subdirectory(${AOC2023_PROJECT})
endforeach()
add_dependencies(userspace aoc2023)
add_dependencies(userspace-install aoc2023-install)