Skip to content

Commit

Permalink
Merge pull request #17 from arves100/master
Browse files Browse the repository at this point in the history
Windows+Cmake
  • Loading branch information
vysheng authored Jan 7, 2021
2 parents f49077d + da9de8b commit 1933e76
Show file tree
Hide file tree
Showing 14 changed files with 1,963 additions and 5,376 deletions.
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(tl-parser LANGUAGES C)

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)
add_definitions("-D_CRT_SECURE_NO_WARNINGS")
list(APPEND SOURCES wgetopt.c wgetopt.h)
if (MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8")
endif()
endif()

add_executable(${PROJECT_NAME} ${SOURCES})
if (NOT WIN32)
target_link_libraries(${PROJECT_NAME} m)
endif()
48 changes: 0 additions & 48 deletions Makefile.in

This file was deleted.

96 changes: 0 additions & 96 deletions config.h.in

This file was deleted.

Loading

0 comments on commit 1933e76

Please sign in to comment.