84ea2a2758f14883c5719ab12372737c23732079
[reactos.git] / lib / pseh / CMakeLists.txt
1
2 if(NOT MSVC)
3
4 if(USE_PSEH3)
5 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/pseh)
6 list(APPEND SOURCE
7 i386/pseh3.c
8 i386/pseh3_i386.S)
9 elseif(USE_DUMMY_PSEH)
10 list(APPEND SOURCE dummy.c)
11 elseif(ARCH STREQUAL "i386")
12 list(APPEND SOURCE
13 i386/framebased.S
14 i386/framebased-gcchack.c
15 i386/framebased-gcchack-asm.S)
16 elseif(ARCH STREQUAL "amd64")
17 list(APPEND SOURCE amd64/framebased.S)
18 elseif(ARCH STREQUAL "powerpc")
19 list(APPEND SOURCE powerpc/framebased.S)
20 endif()
21
22 add_library(pseh ${SOURCE})
23 target_link_libraries(pseh chkstk)
24 add_dependencies(pseh psdk)
25
26 else()
27
28 if(ARCH STREQUAL "i386")
29 list(APPEND ASM_SOURCE
30 i386/seh.s
31 i386/seh_prolog.s)
32 elseif(ARCH STREQUAL "amd64")
33 list(APPEND ASM_SOURCE
34 amd64/seh.s
35 amd64/seh_prolog.s)
36 endif()
37
38 list(APPEND SOURCE dummy.c)
39 add_asm_files(pseh_asm ${ASM_SOURCE})
40 add_library(pseh ${SOURCE} ${pseh_asm})
41 add_dependencies(pseh asm)
42
43 endif()