45 lines
963 B
CMake
45 lines
963 B
CMake
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY)
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
add_library(templ
|
|
template.cpp
|
|
)
|
|
add_dependencies(templ mstch::mstch)
|
|
|
|
add_library(lxs
|
|
automata.cpp
|
|
backend.cpp
|
|
backendmanager.cpp
|
|
driver.cpp
|
|
RegexLexer.cpp
|
|
re.cpp
|
|
RegexParser.cpp
|
|
reParser.cpp
|
|
)
|
|
add_dependencies(lxs templ)
|
|
|
|
add_library(Lexesis-backends
|
|
backends/cpp.cpp
|
|
)
|
|
add_dependencies(Lexesis-backends lxs)
|
|
|
|
add_library(lxsinput
|
|
inputparser.cpp
|
|
)
|
|
|
|
add_executable(Lexesis
|
|
main.cpp
|
|
)
|
|
target_link_libraries(Lexesis Lexesis-backends lxs templ lxsinput mstch::mstch)
|
|
|
|
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
|
add_executable(Lexesis-test
|
|
test.cpp
|
|
)
|
|
target_link_libraries(Lexesis-test Lexesis-backends lxs templ lxsinput mstch::mstch)
|
|
endif()
|
|
|
|
install(TARGETS Lexesis
|
|
RUNTIME DESTINATION bin
|
|
)
|