freepascal on windows only supports shared libraries
authorkoda
Wed, 12 Jun 2013 11:27:00 +0200
changeset 9210 31fedd5ef878
parent 9209 2c1e00a764bd
child 9211 6235925d0fa1
freepascal on windows only supports shared libraries
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)