2021-10-20 22:39:29 +02:00
|
|
|
cmake_minimum_required (VERSION 3.8)
|
|
|
|
|
2021-10-30 19:36:32 +02:00
|
|
|
add_executable (nesemu "main.c" "bus.c" "cpu.c" "cartridge.c" "opcodes.c" "log.c" "ppu.c" "mappers/mapper000.c" "mapper.c")
|
2021-10-20 23:11:08 +02:00
|
|
|
|
2021-10-29 18:04:04 +02:00
|
|
|
target_include_directories(nesemu PUBLIC ${SDL2_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(nesemu PUBLIC ${SDL2_LIBRARIES})
|
2021-10-23 20:36:38 +02:00
|
|
|
|
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
|
2021-10-29 18:04:04 +02:00
|
|
|
)
|