File 0001-fix-only-add-version.rc-for-MSVC.patch of Package mingw64-argtable3
From 0c0932d0439a1749873a6c8d33309038fc2817dc Mon Sep 17 00:00:00 2001
From: Tom Huang <tomghuang@gmail.com>
Date: Sat, 16 Nov 2024 20:11:17 -0800
Subject: [PATCH] fix: only add version.rc for MSVC
We fail to build the shared library in the MINGW platform because we
don't have verrsrc.h header in the MINGW toolchain. To prevent this
issue, we only add version.rc file when we build with MSVC.
Resolves #102
---
src/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7385b25..22bbc7f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -62,7 +62,7 @@ endif()
add_definitions(-D_XOPEN_SOURCE=700)
-if(BUILD_SHARED_LIBS AND WIN32)
+if(BUILD_SHARED_LIBS AND (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC"))
set(COMPANY_NAME "The Argtable3 Project")
set(FILE_DESC "ANSI C command-line parsing library")
set(INTERNAL_NAME "${PROJECT_NAME}")
--
2.48.1