2021-10-20 22:39:29 +02:00
|
|
|
cmake_minimum_required (VERSION 3.8)
|
|
|
|
|
2021-10-28 16:57:37 +02:00
|
|
|
add_executable (nesemu "main.c" "cpu.h" "types.h" "bus.h" "bus.c" "cartridge.h" "cpu.c" "cartridge.c" "opcodes.c" "log.c" "ppu.h" "ppu.c" "mapper.h" "mappers/mapper000.h" "mappers/mapper000.c" "mapper.c")
|
2021-10-20 23:11:08 +02:00
|
|
|
|
2021-10-23 20:36:38 +02:00
|
|
|
target_include_directories(nesemu PUBLIC SDL2-static)
|
|
|
|
target_link_libraries(nesemu PUBLIC SDL2-static SDL2main)
|
|
|
|
|
2021-10-20 23:11:08 +02:00
|
|
|
if(MSVC)
|
|
|
|
target_compile_definitions(nesemu PUBLIC _CRT_SECURE_NO_WARNINGS)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_custom_command(TARGET nesemu POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/roms $<TARGET_FILE_DIR:nesemu>/roms
|
|
|
|
)
|