[BRANCHES]
[reactos.git] / reactos / lib / sdk / crt / CMakeLists.txt
1
2 include_directories(include)
3
4 add_definitions(-D_CRTBLD)
5
6 if(ARCH STREQUAL "i386")
7 list(APPEND CHKSTK_ASM_SOURCE except/i386/chkstk_asm.s)
8 if(NOT MSVC)
9 list(APPEND CHKSTK_SOURCE except/i386/chkstk_ms.s)
10 endif()
11 elseif(ARCH STREQUAL "amd64")
12 list(APPEND CHKSTK_ASM_SOURCE except/amd64/chkstk_asm.s)
13 if(NOT MSVC)
14 list(APPEND CHKSTK_SOURCE except/amd64/chkstk_ms.s)
15 endif()
16 elseif(ARCH STREQUAL "powerpc")
17 list(APPEND CHKSTK_ASM_SOURCE except/powerpc/chkstk_asm.s)
18 endif()
19
20 add_asm_files(chkstk_lib_asm ${CHKSTK_ASM_SOURCE})
21 add_library(chkstk ${CHKSTK_SOURCE} ${chkstk_lib_asm})
22 set_target_properties(chkstk PROPERTIES LINKER_LANGUAGE "C")
23 add_dependencies(chkstk asm)
24
25 include(crt.cmake)
26 include(libcntpr.cmake)
27 include(msvcrtex.cmake)
28 include(oldnames.cmake)
29
30 add_library(user32_wsprintf
31 printf/streamout.c
32 printf/wstreamout.c
33 printf/wsprintfA.c
34 printf/wsprintfW.c
35 printf/wvsprintfA.c
36 printf/wvsprintfW.c
37 printf/wvsnprintfA.c
38 printf/wvsnprintfW.c
39 string/strnlen.c
40 string/wcsnlen.c
41 string/mbstowcs_nt.c
42 string/wcstombs_nt.c)
43
44 add_dependencies(user32_wsprintf psdk)
45 add_target_compile_definitions(user32_wsprintf _USER32_WSPRINTF)
46
47 add_library(getopt misc/getopt.c)
48 add_target_compile_definitions(getopt _DLL __USE_CRTIMP)
49 add_dependencies(getopt psdk)