# HG changeset patch
# User koda
# Date 1371029220 -7200
# Node ID 31fedd5ef878de928a403eaf129e805874ce3342
# Parent  2c1e00a764bd138ac0d3b71eaf9044924774db3e
freepascal on windows only supports shared libraries

diff -r 2c1e00a764bd -r 31fedd5ef878 cmake_modules/platform.cmake
--- a/cmake_modules/platform.cmake	Wed Jun 12 11:18:20 2013 +0200
+++ b/cmake_modules/platform.cmake	Wed Jun 12 11:27:00 2013 +0200
@@ -73,8 +73,13 @@
 
 endif(APPLE)
 
-if(WINDOWS)
+if(MINGW)
     #this flags prevents a few dll hell problems
     set(CMAKE_C_FLAGS "-static-libgcc ${CMAKE_C_FLAGS}")
-endif(WINDOWS)
+endif(MINGW)
 
+if(WIN32)
+    if(NOT BUILD_SHARED_LIB)
+        message(FATAL_ERROR "Static linking is not supported on Windows")
+    endif()
+endif(WIN32)