Skip to content

Commit

Permalink
fix: only add version.rc for MSVC
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tomghuang committed Nov 17, 2024
1 parent f8255d9 commit 0c0932d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 0c0932d

Please sign in to comment.