1
0
Fork 0
mirror of https://gitlab.com/niansa/llama_nds.git synced 2025-03-06 20:53:28 +01:00
llama_nds/CMakeLists.txt
2023-04-03 22:06:29 +02:00

30 lines
975 B
CMake

cmake_minimum_required(VERSION 3.5)
project(llama.any LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
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
Runtime.cpp Runtime.hpp
)
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()