swissChili | 6c61a79 | 2020-07-28 16:29:20 -0700 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 3.0) |
| 2 | |
| 3 | project(6502 VERSION 0.1.0 LANGUAGES C) |
| 4 | |
| 5 | option(GEN_INSTRUCTIONS_HEADER ON) |
| 6 | |
swissChili | dbbd540 | 2020-08-07 15:07:39 -0700 | [diff] [blame] | 7 | include_directories(nuklear) |
| 8 | |
swissChili | 6c61a79 | 2020-07-28 16:29:20 -0700 | [diff] [blame] | 9 | if (${GEN_INSTRUCTIONS_HEADER}) |
| 10 | add_custom_command( |
| 11 | OUTPUT instructions.h |
| 12 | DEPENDS csv2h.awk 6502.csv |
| 13 | COMMAND awk -f csv2h.awk 6502.csv > instructions.h |
| 14 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) |
| 15 | endif() |
| 16 | |
swissChili | b71e027 | 2020-08-08 15:56:14 -0700 | [diff] [blame] | 17 | add_executable(6502 main.c cpu.c cpu.h dbg.c dbg.h |
| 18 | instructions.h gui.h gui.c screen.h screen.c common.h common.c) |
swissChili | c6b4f7e | 2020-08-09 16:36:36 -0700 | [diff] [blame] | 19 | target_link_libraries(6502 readline SDL2 GL GLU GLEW m rt pthread) |