Browse files

fix for static builds with mingw-w64 compilers - part 1

  • Loading branch information...
1 parent 19cdceb commit 165f2b1888c86050d2bc43943311416b7f2dee25 @BMBurstein BMBurstein committed May 1, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 cmake/Config.cmake
View
6 cmake/Config.cmake
@@ -1,4 +1,3 @@
-
# detect the OS
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(WINDOWS 1)
@@ -47,6 +46,11 @@ elseif(CMAKE_COMPILER_IS_GNUCXX)
set(COMPILER_GCC 1)
execute_process(COMMAND "${CMAKE_CXX_COMPILER}" "-dumpversion" OUTPUT_VARIABLE GCC_VERSION_OUTPUT)
string(REGEX REPLACE "([0-9]+\\.[0-9]+).*" "\\1" GCC_VERSION "${GCC_VERSION_OUTPUT}")
+ execute_process(COMMAND "${CMAKE_CXX_COMPILER}" "-dumpmachine" OUTPUT_VARIABLE GCC_MACHINE)
+ string(STRIP "${GCC_MACHINE}" GCC_MACHINE)
+ if(${GCC_MACHINE} MATCHES ".*w64.*")
+ set(COMPILER_GCC_W64 1)
+ endif()
elseif(MSVC)
set(COMPILER_MSVC 1)
if(MSVC_VERSION EQUAL 1400)

0 comments on commit 165f2b1

Please sign in to comment.