cmake_minimum_required(VERSION 3.15) project(r16) set(CMAKE_C_STANDARD 11 LANGUAGES c) add_library(carg-parse ./lib/carg-parse/carg-parse.c ./lib/carg-parse/carg-parse.h ) add_executable(r16a ./asm/main.c ./asm/assembler.c ./asm/assembler.h ./asm/asm_const.h ./emu/cpu_const.h ./emu/cpu_human.h ) add_executable(r16e ./emu/main.c ./emu/cpu/instruction.c ./emu/cpu/instruction.h ./emu/cpu/ram.c ./emu/cpu/ram.h ./emu/cpu/register.c ./emu/cpu/register.h ./emu/cpu/stack.c ./emu/cpu/stack.h ./emu/cpu.c ./emu/cpu.h ./emu/cpu_const.h ./emu/cpu_human.h ) target_link_libraries(r16a PRIVATE carg-parse) target_link_libraries(r16e PRIVATE carg-parse)