[CMAKE]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Fri, 5 Nov 2010 00:08:12 +0000 (00:08 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Fri, 5 Nov 2010 00:08:12 +0000 (00:08 +0000)
Add /SAFESEH:NO to MSVC linker command line to fix unresolved symbol issue.

svn path=/branches/cmake-bringup/; revision=49473

msc.cmake

index d7a8c95..c555033 100644 (file)
--- a/msc.cmake
+++ b/msc.cmake
@@ -13,6 +13,12 @@ else()
 add_definitions(/GS- /Zl /Zi)\r
 add_definitions(-Dinline=__inline -D__STDC__=1)\r
 \r
+IF(${_MACHINE_ARCH_FLAG} MATCHES X86)\r
+  SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")\r
+  SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")\r
+  SET (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")\r
+ENDIF()\r
+\r
 link_directories("${REACTOS_BINARY_DIR}/importlibs" ${REACTOS_BINARY_DIR}/lib/3rdparty/mingw)\r
 \r
 set(CMAKE_RC_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")\r