36 lines
889 B
CMake
36 lines
889 B
CMake
find_package(fmt REQUIRED)
|
|
find_package(utf8cpp REQUIRED)
|
|
find_package(ctre REQUIRED)
|
|
|
|
function(add_day_executables)
|
|
foreach(src IN LISTS ARGN)
|
|
get_filename_component(name "${src}" NAME_WE)
|
|
|
|
add_executable(${name} "${src}")
|
|
|
|
target_include_directories(${name} PUBLIC "${PROJECT_SOURCE_DIR}")
|
|
target_compile_features(${name} PRIVATE cxx_std_23)
|
|
|
|
target_link_libraries(${name}
|
|
PRIVATE
|
|
${PLATFORM_LINK_LIBRARIES}
|
|
fmt
|
|
utf8cpp
|
|
ctre
|
|
)
|
|
|
|
target_compile_definitions(${name} PRIVATE ${PLATFORM_DEFINITIONS})
|
|
target_compile_options(${name} PRIVATE ${BASE_OPTIONS})
|
|
|
|
source_group(TREE "${CMAKE_CURRENT_LIST_DIR}" FILES "${src}")
|
|
endforeach()
|
|
endfunction()
|
|
|
|
|
|
add_day_executables(
|
|
"day01.cpp"
|
|
"day02.cpp"
|
|
"day03.cpp"
|
|
"day04.cpp"
|
|
)
|