nesemu/CMakeLists.txt

38 lines
1.1 KiB
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 )
2024-07-25 21:22:00 -04:00
if (NES_DEBUG)
add_definitions(-DDEBUG=1)
endif(NES_DEBUG)
2024-04-30 12:28:43 -04:00
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-16 15:46:22 -05:00
add_subdirectory(utils)
2024-05-17 00:33:37 -04:00
add_subdirectory(gui)
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"
2024-05-17 00:33:37 -04:00
"${PROJECT_SOURCE_DIR}/utils"
"${PROJECT_SOURCE_DIR}/gui")
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-05-23 23:52:04 -04:00
target_link_libraries(nes_emulator nes_cpu nes_ppu nes_mappers nes_rom nes_utils nes_gui log.c)
2024-04-30 12:28:43 -04:00
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})