swissChili | 97b5d8b | 2020-08-15 20:00:54 -0700 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 3.0) |
| 2 | |
| 3 | project(6502 VERSION 0.1.0 LANGUAGES C) |
| 4 | |
swissChili | dab15a6 | 2020-08-17 15:41:27 -0700 | [diff] [blame] | 5 | include(TestBigEndian) |
| 6 | test_big_endian(BIG_ENDIAN) |
| 7 | |
swissChili | abccdfc | 2021-01-08 21:39:12 -0800 | [diff] [blame^] | 8 | option(VERBOSE OFF "Verbose assembler messages") |
swissChili | dab15a6 | 2020-08-17 15:41:27 -0700 | [diff] [blame] | 9 | |
| 10 | if (${BIG_ENDIAN}) |
| 11 | add_compile_definitions(BIG_ENDIAN) |
| 12 | else() |
| 13 | add_compile_definitions(LITTLE_ENDIAN) |
| 14 | endif() |
| 15 | |
swissChili | abccdfc | 2021-01-08 21:39:12 -0800 | [diff] [blame^] | 16 | if(${VERBOSE}) |
| 17 | add_compile_definitions(VERBOSE_ASSEMBLER) |
| 18 | endif() |
| 19 | |
swissChili | dab15a6 | 2020-08-17 15:41:27 -0700 | [diff] [blame] | 20 | |
swissChili | c382994 | 2020-09-06 19:36:04 -0700 | [diff] [blame] | 21 | add_executable(6502-as main.c as.h as.c pp.c map.h map.c hash.c hash.c) |
swissChili | 6a92301 | 2020-08-18 17:47:27 -0700 | [diff] [blame] | 22 | |
swissChili | abccdfc | 2021-01-08 21:39:12 -0800 | [diff] [blame^] | 23 | install(TARGETS 6502-as RUNTIME DESTINATION bin) |