-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (21 loc) · 990 Bytes
/
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
cmake_minimum_required(VERSION 2.8)
project(elang)
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
BISON_TARGET(Parser parser.y ${CMAKE_CURRENT_BINARY_DIR}/src/parser.cpp)
FLEX_TARGET(Scanner scanner.l ${CMAKE_CURRENT_BINARY_DIR}/src/scanner.cpp)
ADD_FLEX_BISON_DEPENDENCY(Scanner Parser)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src")
set(ELANG_SRC ${BISON_Parser_OUTPUTS} ${FLEX_Scanner_OUTPUTS} src/main.cpp
src/ast.cpp src/value.cpp )
set(ELANG_GUI_SRC src/maingui.cpp src/mainwindow.cpp src/highlighter.cpp)
set(ELANG_GUI_H src/mainwindow.h src/highlighter.h)
set(ELANG_GUI_UI ui/mainwindow.ui)
QT4_WRAP_CPP(ELANG_GUI_MOC_H ${ELANG_GUI_H})
QT4_WRAP_UI(ELANG_GUI_UI_H ${ELANG_GUI_UI})
add_executable(erun ${ELANG_SRC})
add_executable(egui ${ELANG_GUI_SRC} ${ELANG_GUI_UI_H} ${ELANG_GUI_H} ${ELANG_GUI_MOC_H})
target_link_libraries(egui ${QT_LIBRARIES})