cmake_minimum_required(VERSION 3.5) project(llama.any LANGUAGES CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) add_executable(llama main.cpp Client.hpp Client.cpp Socket.hpp Receiver.hpp Receiver.cpp Sender.hpp Sender.cpp AsyncManager.hpp AsyncManager.cpp Runtime.cpp Runtime.hpp basic-coro/AwaitableTask.hpp basic-coro/SingleEvent.hpp basic-coro/SingleEvent.cpp ) target_compile_definitions(llama PUBLIC PLATFORM="${CMAKE_SYSTEM_NAME}") if (CMAKE_SYSTEM_NAME STREQUAL Nintendo3DS) target_compile_definitions(llama PUBLIC PLATFORM_3DS) elseif (CMAKE_SYSTEM_NAME STREQUAL NintendoDS) target_compile_definitions(llama PUBLIC PLATFORM_DS) target_link_libraries(llama PUBLIC dswifi9 nds9) elseif (CMAKE_SYSTEM_NAME STREQUAL Linux) target_compile_definitions(llama PUBLIC PLATFORM_LINUX) elseif (CMAKE_SYSTEM_NAME STREQUAL Windows) target_compile_definitions(llama PUBLIC PLATFORM_WINDOWS) target_link_libraries(llama PUBLIC Ws2_32) else() message(SEND_ERROR "${CMAKE_SYSTEM_NAME} is not a supported platform!") endif()