[SDK][CRT] Fix _ismbblead undefined error on MSVC
[reactos.git] / sdk / lib / 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(memcmp mem/memcmp.c)
53 add_dependencies(memcmp psdk)
54
55 add_library(getopt misc/getopt.c)
56 add_target_compile_definitions(getopt _DLL __USE_CRTIMP)
57 add_dependencies(getopt psdk)
58
59 add_library(strtol
60 string/ctype.c
61 string/iswctype.c
62 string/strtoi64.c
63 string/strtol.c
64 string/strtoul.c
65 string/strtoull.c
66 string/wctype.c)
67 add_target_compile_definitions(strtol _LIBCNT_)
68 add_dependencies(strtol psdk)
69
70
71 if(ARCH STREQUAL "i386")
72 list(APPEND ATAN2_ASM_SOURCE math/i386/atan2_asm.s)
73 elseif(ARCH STREQUAL "amd64")
74 list(APPEND ATAN2_ASM_SOURCE math/amd64/atan2.S)
75 elseif(ARCH STREQUAL "arm")
76 list(APPEND ATAN2_ASM_SOURCE math/arm/atan2.s)
77 endif()
78
79 add_asm_files(atan2_asm ${ATAN2_ASM_SOURCE})
80 add_library(atan2 ${atan2_asm})
81 set_target_properties(atan2 PROPERTIES LINKER_LANGUAGE "C")
82 add_dependencies(atan2 asm)
83
84