2021-10-20 20:39:29 +00:00
|
|
|
|
cmake_minimum_required (VERSION 3.8)
|
|
|
|
|
|
2021-10-28 14:57:37 +00: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 21:11:08 +00:00
|
|
|
|
|
2021-10-29 16:04:04 +00:00
|
|
|
|
target_include_directories(nesemu PUBLIC ${SDL2_INCLUDE_DIRS})
|
|
|
|
|
target_link_libraries(nesemu PUBLIC ${SDL2_LIBRARIES})
|
2021-10-23 18:36:38 +00:00
|
|
|
|
|
2021-10-20 21:11:08 +00: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
|
2021-10-29 16:04:04 +00:00
|
|
|
|
)
|