44 lines
723 B
CMake
44 lines
723 B
CMake
|
|
include_directories(include)
|
|
|
|
set(LIBRARY_OUTPUT_PATH lib/${CMAKE_BUILD_TYPE})
|
|
|
|
set(Blang_VERSION 1.0.0)
|
|
set(Blang_RELEASE 1)
|
|
configure_file(include/version.h.in include/version.h @ONLY)
|
|
|
|
BISON_TARGET(BlangParser parser.y lib/parser_gen.cpp)
|
|
FLEX_TARGET(BlangScanner lexer.l lib/lexer_gen.cpp)
|
|
ADD_FLEX_BISON_DEPENDENCY(BlangScanner BlangParser)
|
|
|
|
file(
|
|
GLOB_RECURSE
|
|
sources_files
|
|
src/*
|
|
)
|
|
|
|
add_executable(Blang ${sources_files})
|
|
|
|
file(
|
|
GLOB_RECURSE
|
|
lib_files
|
|
lib/*
|
|
)
|
|
|
|
add_library(
|
|
libblang
|
|
SHARED
|
|
${lib_files}
|
|
)
|
|
|
|
target_link_libraries(
|
|
Blang
|
|
libblang
|
|
)
|
|
|
|
target_link_libraries(
|
|
libblang
|
|
libpreblang
|
|
blangutils
|
|
)
|