From ff5df971cb7c297f02b8565be1644def05a4f2a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Terziman?= Date: Thu, 7 Nov 2013 15:08:27 +0100 Subject: [PATCH] Fixing compiler flags for mingw --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb15ef81f..726155a69 100644 --- a/CMakeLists.txt +++ b/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 )