CMakeLists.txt 612 Bytes
Newer Older
Jaime Arias's avatar
Jaime Arias committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# set minimum cmake version
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

# project name and language
project(pn-parser-src LANGUAGES CXX)

# dependencies
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)

# execute bison and flex
bison_target(rdp_parser RdPMonteur.y ${CMAKE_CURRENT_BINARY_DIR}/parser.c)
flex_target(rdp_scanner RdPMonteur.l ${CMAKE_CURRENT_BINARY_DIR}/lexer.c)
add_flex_bison_dependency(rdp_scanner rdp_parser)

# generate a the library from sources
add_library(parser
  STATIC
    Net.h
    Net.cpp
    RdPMonteur.h
    ${BISON_rdp_parser_OUTPUTS}
    ${FLEX_rdp_scanner_OUTPUTS}
)