# The Linux x86_64 DS core: the same app-engine melonDS core Windows ships, with EXPAND, ZOOM and the wide renderer.
# It lives in windows/ds-core because the Windows build first needed it; its CMake is portable and the sources are the
# app's. Build it beside the Linux host, then put pokedaisy_ds_libretro.so in the host's core folder.
#
#   cmake -S linux/ds-core -B build/ds-core -DCMAKE_BUILD_TYPE=Release
#   cmake --build build/ds-core --target pokedaisy_ds_libretro
#
# The aarch64 TrimUI package keeps the DSperate core (linux/libretro-ds): this core is C++20 and needs a newer
# toolchain than the checksum-pinned TrimUI GCC 8.3 SDK.
cmake_minimum_required(VERSION 3.18)
project(pokedaisy_ds_core_linux LANGUAGES C CXX)

# Put the module at the top of this build folder, so packaging can name one path.
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" CACHE PATH "" FORCE)
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../../windows/ds-core" "${CMAKE_BINARY_DIR}/app-ds-core")
