cmake_minimum_required(VERSION 3.16)
if(DEFINED ENV{VMUPRO_SDK_PATH})
  set(VMUPRO_SDK "$ENV{VMUPRO_SDK_PATH}")
else()
  set(VMUPRO_SDK "${CMAKE_CURRENT_LIST_DIR}/vendor/vmupro-sdk")
endif()
set(EXTRA_COMPONENT_DIRS "${VMUPRO_SDK}/sdk/c")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(vmupro_ngpc)
include(elf_loader)
# Bundle compiler arithmetic helpers instead of assuming firmware exports
# GCC internals (64-bit diagnostic division and cold sound-init arithmetic).
set(ELF_LIBS "-lgcc")
project_elf(ngpc_elf)
# Official VMU Pro SDK native application linkage. tools/check_imports.py
# checks the resulting app imports against documented firmware symbols.
target_link_options(${CMAKE_PROJECT_NAME}.elf PRIVATE -Wl,--unresolved-symbols=ignore-all)
