[PRINTING]
[reactos.git] / reactos / sdk / lib / pseh / CMakeLists.txt
1
2 if(NOT MSVC)
3
4 if(USE_PSEH3)
5 include_directories(${REACTOS_SOURCE_DIR}/sdk/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 elseif(ARCH STREQUAL "arm")
37 list(APPEND ASM_SOURCE
38 arm/seh_prolog.s)
39 list(APPEND SOURCE dummy.c)
40 endif()
41
42 list(APPEND SOURCE dummy.c)
43 add_asm_files(pseh_asm ${ASM_SOURCE})
44 add_library(pseh ${SOURCE} ${pseh_asm})
45 add_dependencies(pseh asm)
46
47 endif()