hello_ps2/CMakeLists.txt
2025-03-28 10:50:13 -06:00

15 lines
590 B
CMake

cmake_minimum_required(VERSION 3.10)
set(MAKE_TOOLCHAIN_FILE $PS2SDK/ps2dev.cmake)
set(CMAKE_C_FLAGS_DEBUG -DDEBUG)
project(helloworld)
FILE(GLOB c_src src/**.c)
add_executable(helloworld.elf ${c_src})
target_link_libraries(helloworld.elf debug -ldebug -lgraph -ldma -ldraw)
target_include_directories(helloworld.elf PUBLIC include/)
add_custom_command(
TARGET helloworld.elf
POST_BUILD
COMMAND mkisofs -l -o helloworld.iso helloworld.elf ${CMAKE_CURRENT_SOURCE_DIR}/ISO
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/SYSTEM.CNF ${CMAKE_CURRENT_BUILD_DIR}/helloworld.elf
VERBATIM
)