[PSEH3]
[reactos.git] / reactos / lib / pseh / CMakeLists.txt
index be835b2..1e957bf 100644 (file)
@@ -1,30 +1,35 @@
 
 if(NOT MSVC)
 
-    list(APPEND SOURCE framebased.c)
-    if(ARCH MATCHES i386)
+    if (USE_PSEH3)
+        include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/pseh)
+        list(APPEND SOURCE
+            i386/pseh3.c
+            i386/pseh3_i386.S)
+    elseif(ARCH STREQUAL "i386")
         list(APPEND SOURCE
             i386/framebased.S
             i386/framebased-gcchack.c
             i386/framebased-gcchack-asm.S)
-    elseif(ARCH MATCHES amd64)
+    elseif(ARCH STREQUAL "amd64")
         list(APPEND SOURCE amd64/framebased.S)
-    elseif(ARCH MATCHES powerpc)
+    elseif(ARCH STREQUAL "powerpc")
         list(APPEND SOURCE powerpc/framebased.S)
     endif()
 
     add_library(pseh ${SOURCE})
+    allow_warnings(pseh)
     target_link_libraries(pseh chkstk)
     add_dependencies(pseh psdk)
 
 else()
 
-    if(ARCH MATCHES i386)
+    if(ARCH STREQUAL "i386")
         list(APPEND SOURCE
             dummy.c
             i386/seh.s
             i386/seh_prolog.s)
-    elseif(ARCH MATCHES amd64)
+    elseif(ARCH STREQUAL "amd64")
         list(APPEND SOURCE
             dummy.c
             amd64/seh.s