Serious-Engine/Sources/Ecc/CMakeLists.txt
James Le Cuirot c09d18623e
Allow ecc to be built independently using its own CMakeLists.txt file
This makes cross-compiling easier, and saves having to build once each
for TFE and TSE.

I considered using CMake's import/export feature, but there's little
point when you're only importing one binary target. Pointing the ECC
variable at the ecc binary itself is simpler.

I copied the minimum CMake version of 2.8.7 from the parent
project. To be confident this would actually work, I tested building
under CentOS 7 with CMake 2.8.12.
2021-11-16 23:06:41 +00:00

19 lines
382 B
CMake

cmake_minimum_required(VERSION 2.8.7)
project(Ecc)
if(MSVC)
add_compile_options(/W4)
else()
add_compile_options(-Wall)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
include(ParserAndScanner)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)
add_parser_and_scanner("Parser" "Scanner")
add_executable(ecc Main.cpp Parser.cpp Parser.h Scanner.cpp)