From c478b339e0e353dee3c9fc432980c04d1b702d21 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Thu, 24 Dec 2020 12:51:44 +0100 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39dd988..9092575 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,16 @@ 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} crc32.h crc32.c tlc.c tl-parser.c tl-parser.h tl-parser-tree.h tl-tl.h portable_endian.h wingetopt.c wingetopt.h) +add_executable(${PROJECT_NAME} ${SOURCES}) if (NOT WIN32) target_link_libraries(${PROJECT_NAME} m) endif()