-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (32 loc) · 1.02 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Matrix VM root
cmake_minimum_required(VERSION 2.6)
project(matrixvm)
set(CMAKE_CXX_FLAGS "-g3 -Wall --std=c++0x ${CMAKE_CXX_FLAGS}")
find_library(BOOST_SYSTEM "boost_system" REQUIRED)
find_library(BOOST_THREAD NAMES "boost_thread" "boost_thread-mt" REQUIRED)
include_directories(${PROJECT_SOURCE_DIR})
include(CheckLibraryExists)
# Look for dl library
check_library_exists(dl dlopen "" HAVE_DL)
if (HAVE_DL)
set (EXTRA_LIBS ${EXTRA_LIBS} dl)
endif (HAVE_DL)
# Look for X11 library
check_library_exists(X11 XCreateSimpleWindow "" HAVE_X11)
if (HAVE_X11)
set (EXTRA_LIBS ${EXTRA_LIBS} X11)
endif (HAVE_X11)
# build
add_executable(matrixvm
matrixvm.cpp
dev/interruptcontroller.cpp
dev/basicinterruptcontroller.cpp
dev/timerdevice.cpp
dev/x11displaymanager.cpp
dev/nulldisplaymanager.cpp
machine/dladapter.cpp
machine/motherboard.cpp
)
target_link_libraries(matrixvm ${BOOST_SYSTEM} ${BOOST_THREAD} ${EXTRA_LIBS})
add_subdirectory(basiccpu)
add_subdirectory(dev)