NESEmulator/NES Emulator/CMakeLists.txt

14 lines
524 B
CMake
Raw Normal View History

2021-10-20 20:39:29 +00:00
cmake_minimum_required (VERSION 3.8)
2021-10-23 17:30:02 +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")
2021-10-20 21:11:08 +00:00
2021-10-23 18:36:38 +00:00
target_include_directories(nesemu PUBLIC SDL2-static)
target_link_libraries(nesemu PUBLIC SDL2-static SDL2main)
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
)