tl-parser/CMakeLists.txt
Arves100 3af38fb06b Revamp build system with CMake
- Completely removed config.h generation file, as it was not used
	anywere in the code
- Removed all the old build files and switched to CMake (3.0+)
- As tl-parser only uses zlib for crc32, removing the dependency makes
	the CMake file easier to maintain and makes the code building
	without third party code. The crc32 implementation was taken from
	abb3e47a98.
2020-12-24 03:32:53 +01:00

17 lines
401 B
CMake

cmake_minimum_required(VERSION 3.0)
project(tl-parser)
set(SOURCES crc32.h crc32.c tlc.c tl-parser.c tl-parser.h tl-parser-tree.h tl-tl.h portable_endian.h)
if (WIN32)
list(APPEND SOURCES wingetopt.c wingetopt.h)
endif()
if (MSVC)
set(CMAKE_EXE_LINKER_FLAGS "/SUBSYSTEM:CONSOLE")
endif()
add_executable(${PROJECT_NAME} ${SOURCES})
if (NOT WIN32)
target_link_libraries(${PROJECT_NAME} m)
endif()