53b496397e46614407a7a95a33f75dce68712535
[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 "arm")
17 list(APPEND CHKSTK_ASM_SOURCE except/arm/chkstk_asm.s)
18 if(NOT MSVC)
19 list(APPEND CHKSTK_SOURCE except/arm/chkstk_ms.s)
20 endif()
21 elseif(ARCH STREQUAL "powerpc")
22 list(APPEND CHKSTK_ASM_SOURCE except/powerpc/chkstk_asm.s)
23 endif()
24
25 add_asm_files(chkstk_lib_asm ${CHKSTK_ASM_SOURCE})
26 add_library(chkstk ${CHKSTK_SOURCE} ${chkstk_lib_asm})
27 set_target_properties(chkstk PROPERTIES LINKER_LANGUAGE "C")
28 add_dependencies(chkstk asm)
29
30 include(crt.cmake)
31 include(libcntpr.cmake)
32 include(msvcrtex.cmake)
33 include(oldnames.cmake)
34
35 add_library(user32_wsprintf
36 printf/streamout.c
37 printf/wstreamout.c
38 printf/wsprintfA.c
39 printf/wsprintfW.c
40 printf/wvsprintfA.c
41 printf/wvsprintfW.c
42 printf/wvsnprintfA.c
43 printf/wvsnprintfW.c
44 string/strnlen.c
45 string/wcsnlen.c
46 string/mbstowcs_nt.c
47 string/wcstombs_nt.c)
48
49 add_dependencies(user32_wsprintf psdk)
50 add_target_compile_definitions(user32_wsprintf _USER32_WSPRINTF)
51
52 add_library(getopt misc/getopt.c)
53 add_target_compile_definitions(getopt _DLL __USE_CRTIMP)
54 add_dependencies(getopt psdk)