Explorar o código

Fixing compiler flags for mingw

Léo Terziman %!s(int64=12) %!d(string=hai) anos
pai
achega
ff5df971cb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -18,7 +18,7 @@ set(LIBASSIMP-DEV_COMPONENT libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MI
 set(CPACK_COMPONENTS_ALL assimp-bin ${LIBASSIMP_COMPONENT} ${LIBASSIMP-DEV_COMPONENT} assimp-dev)
 set(ASSIMP_LIBRARY_SUFFIX "" CACHE STRING "Suffix to append to library names")
 
-if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+if((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_COMPILER_IS_MINGW)
   add_definitions(-fPIC) # this is a very important switch and some libraries seem now to have it....
   ## hide all not-exported symbols
   add_definitions( -fvisibility=hidden -Wall )