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 | |
| 7 | if (${GEN_INSTRUCTIONS_HEADER}) |
| 8 | add_custom_command( |
| 9 | OUTPUT instructions.h |
| 10 | DEPENDS csv2h.awk 6502.csv |
| 11 | COMMAND awk -f csv2h.awk 6502.csv > instructions.h |
| 12 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) |
| 13 | endif() |
| 14 | |
swissChili | 62d6d5d | 2020-07-30 20:12:47 -0700 | [diff] [blame^] | 15 | add_executable(6502 main.c cpu.c cpu.h dbg.c dbg.h instructions.h) |
| 16 | target_link_libraries(6502 readline) |