nesemu/CMakeLists.txt

33 lines
1002 B
CMake
Raw Normal View History

2024-04-30 12:28:43 -04:00
set(CMAKE_C_COMPILER gcc)
2023-10-05 17:05:06 -04:00
cmake_minimum_required(VERSION 3.10)
2024-04-30 12:28:43 -04:00
project(nes_emulator LANGUAGES C VERSION 0.1 )
add_subdirectory(libs/log.c)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include_directories(${PROJECT_SOURCE_DIR}/libs/log.c/src ${COMMON_INCLUDES})
2023-10-05 17:05:06 -04:00
add_subdirectory(cpu)
2024-01-06 14:27:09 -05:00
add_subdirectory(ppu)
2023-11-26 12:11:49 -05:00
add_subdirectory(mappers)
2023-12-03 00:27:07 -05:00
add_subdirectory(rom)
2024-01-07 16:20:37 -05:00
add_subdirectory(debugger)
2024-01-16 15:46:22 -05:00
add_subdirectory(utils)
2023-12-03 00:27:07 -05:00
2023-11-26 12:11:49 -05:00
list(APPEND EXTRA_INCLUDES
"${PROJECT_SOURCE_DIR}/cpu"
2024-01-06 14:27:09 -05:00
"${PROJECT_SOURCE_DIR}/ppu"
2023-12-03 00:27:07 -05:00
"${PROJECT_SOURCE_DIR}/mappers"
2024-01-07 16:20:37 -05:00
"${PROJECT_SOURCE_DIR}/rom"
2024-01-16 15:46:22 -05:00
"${PROJECT_SOURCE_DIR}/debugger"
"${PROJECT_SOURCE_DIR}/utils")
2023-10-05 17:05:06 -04:00
2024-04-30 12:28:43 -04:00
set(HEADERS include/system.h include/types.h)
set(SOURCE main.c system.c)
2023-10-05 17:05:06 -04:00
2024-04-30 12:28:43 -04:00
add_executable(nes_emulator ${HEADERS} ${SOURCE})
2023-10-05 17:05:06 -04:00
2024-04-30 12:28:43 -04:00
target_link_libraries(nes_emulator nes_cpu nes_ppu nes_mappers nes_rom nes_debugger nes_utils log.c)
target_include_directories(nes_emulator PUBLIC
2023-10-05 17:05:06 -04:00
"${PROJECT_BINARY_DIR}"
2024-04-30 12:28:43 -04:00
${EXTRA_INCLUDES})