File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -473,19 +473,21 @@ ELSE ()
473473 SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG" )
474474 ENDIF ()
475475
476- IF (MINGW) # MinGW always does PIC and complains if we tell it to
476+ IF (MINGW OR MSYS ) # MinGW and MSYS always do PIC and complain if we tell them to
477477 STRING (REGEX REPLACE "-fPIC" "" CMAKE_SHARED_LIBRARY_C_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS} " )
478- # MinGW >= 3.14 uses the C99-style stdio functions
479- # automatically, but forks like mingw-w64 still want
480- # us to define this in order to use them
481- ADD_DEFINITIONS (-D__USE_MINGW_ANSI_STDIO=1)
482-
483478 ELSEIF (BUILD_SHARED_LIBS )
484479 ADD_C_FLAG_IF_SUPPORTED(-fvisibility=hidden)
485480
486481 SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC" )
487482 ENDIF ()
488483
484+ IF (MINGW)
485+ # MinGW >= 3.14 uses the C99-style stdio functions
486+ # automatically, but forks like mingw-w64 still want
487+ # us to define this in order to use them
488+ ADD_DEFINITIONS (-D__USE_MINGW_ANSI_STDIO=1)
489+ ENDIF ()
490+
489491 ADD_C_FLAG_IF_SUPPORTED(-Wdocumentation)
490492 ADD_C_FLAG_IF_SUPPORTED(-Wno-missing-field-initializers)
491493 ADD_C_FLAG_IF_SUPPORTED(-Wstrict-aliasing=2)
You can’t perform that action at this time.
0 commit comments