I am trying to use CMake for the MIT JOS Operating system project - http://repo.or.cz/mit-jos.git/tree or https://pdos.csail.mit.edu/6.828/2016/jos.git
Here is the directory structure
lab
- .bochsrc
- CODING
- GNUmakefile
- boot
- conf
- fs
- grade.sh
+ inc
- assert.h
- elf.h
- error.h
- kbdreg.h
- memlayout.h
- mmu.h
- stab.h
- stdarg.h
- stdio.h
- string.h
- types.h
- x86.h
- kern
- lib
- mergedep.pl
- user
- CMakeLists.txt
The CMakeLists.txt
under the lab
folder (i.e. the project folder) looks like
cmake_minimum_required(VERSION 3.6)
project(lab)
set(CMAKE_CXX_STANDARD 11)
set(SOURCE_FILES
boot/main.c
fs/test.c
kern/console.c
kern/console.h
kern/entrypgdir.c
kern/init.c
kern/kdebug.c
kern/kdebug.h
kern/monitor.c
kern/monitor.h
kern/printf.c
lib/printfmt.c
lib/readline.c
lib/string.c
user/sendpage.c)
add_executable(lab ${SOURCE_FILES})
How can I include the header files under inc
so that the source files can still include them using #include <inc/types.h>
etc. rather than #include "../inc/types.h"
?