c12f3e21877fbfd9a35424b6c78a80c9534d193d
[reactos.git] / lib / sdk / crt / CMakeLists.txt
1
2 include_directories(include)
3
4 add_definitions(-D_CRTBLD)
5
6 file(GLOB_RECURSE CRT_SOURCE "*.c")
7 LIST(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/stdio/findgen.c)
8 LIST(REMOVE_ITEM CRT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/string/strtold.c)
9
10 add_library(crt ${CRT_SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/crt_precomp.h.gch)
11 set_property(TARGET crt PROPERTY COMPILE_DEFINITIONS __MINGW_IMPORT=extern USE_MSVCRT_PREFIX _MSVCRT_LIB_ _MSVCRT_ _MT)
12 add_pch(crt ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${CRT_SOURCE})
13 add_dependencies(crt psdk)
14
15 if(ARCH MATCHES i386)
16 set(LIBCNTPR_SOURCE
17 ${CMAKE_CURRENT_SOURCE_DIR}/except/i386/chkstk_asm.s
18 ${CMAKE_CURRENT_SOURCE_DIR}/except/i386/seh.s
19 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/alldiv_asm.s
20 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/alldvrm_asm.s
21 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/allmul_asm.s
22 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/allrem_asm.s
23 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/allshl_asm.s
24 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/allshr_asm.s
25 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/atan_asm.s
26 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/aulldiv_asm.s
27 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/aulldvrm_asm.s
28 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/aullrem_asm.s
29 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/aullshr_asm.s
30 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/ceil_asm.s
31 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/cos_asm.s
32 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/fabs_asm.s
33 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/floor_asm.s
34 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/ftol_asm.s
35 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/log_asm.s
36 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/pow_asm.s
37 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/sin_asm.s
38 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/sqrt_asm.s
39 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/tan_asm.s
40 ${CMAKE_CURRENT_SOURCE_DIR}/math/i386/ci.c
41 ${CMAKE_CURRENT_SOURCE_DIR}/math/abs.c
42 ${CMAKE_CURRENT_SOURCE_DIR}/math/div.c
43 ${CMAKE_CURRENT_SOURCE_DIR}/math/labs.c
44 ${CMAKE_CURRENT_SOURCE_DIR}/math/rand_nt.c
45 ${CMAKE_CURRENT_SOURCE_DIR}/mem/i386/memchr_asm.s
46 ${CMAKE_CURRENT_SOURCE_DIR}/mem/i386/memcpy_asm.s
47 ${CMAKE_CURRENT_SOURCE_DIR}/mem/i386/memmove_asm.s
48 ${CMAKE_CURRENT_SOURCE_DIR}/mem/i386/memset_asm.s
49 ${CMAKE_CURRENT_SOURCE_DIR}/mem/memccpy.c
50 ${CMAKE_CURRENT_SOURCE_DIR}/mem/memcmp.c
51 ${CMAKE_CURRENT_SOURCE_DIR}/mem/memicmp.c
52 ${CMAKE_CURRENT_SOURCE_DIR}/search/bsearch.c
53 ${CMAKE_CURRENT_SOURCE_DIR}/search/lfind.c
54 ${CMAKE_CURRENT_SOURCE_DIR}/setjmp/i386/setjmp.s
55 ${CMAKE_CURRENT_SOURCE_DIR}/stdlib/qsort.c
56 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/strcat_asm.s
57 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/strchr_asm.s
58 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/strcmp_asm.s
59 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/strcpy_asm.s
60 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/strlen_asm.s
61 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/strncat_asm.s
62 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/strncmp_asm.s
63 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/strncpy_asm.s
64 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/strnlen_asm.s
65 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/strrchr_asm.s
66 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/wcscat_asm.s
67 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/wcschr_asm.s
68 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/wcscmp_asm.s
69 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/wcscpy_asm.s
70 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/wcslen_asm.s
71 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/wcsncat_asm.s
72 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/wcsncmp_asm.s
73 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/wcsncpy_asm.s
74 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/wcsnlen_asm.s
75 ${CMAKE_CURRENT_SOURCE_DIR}/string/i386/wcsrchr_asm.s
76 ${CMAKE_CURRENT_SOURCE_DIR}/string/ctype.c
77 ${CMAKE_CURRENT_SOURCE_DIR}/string/scanf.c
78 ${CMAKE_CURRENT_SOURCE_DIR}/string/strcspn.c
79 ${CMAKE_CURRENT_SOURCE_DIR}/string/stricmp.c
80 ${CMAKE_CURRENT_SOURCE_DIR}/string/strnicmp.c
81 ${CMAKE_CURRENT_SOURCE_DIR}/string/strlwr.c
82 ${CMAKE_CURRENT_SOURCE_DIR}/string/strrev.c
83 ${CMAKE_CURRENT_SOURCE_DIR}/string/strset.c
84 ${CMAKE_CURRENT_SOURCE_DIR}/string/strstr.c
85 ${CMAKE_CURRENT_SOURCE_DIR}/string/strupr.c
86 ${CMAKE_CURRENT_SOURCE_DIR}/string/strpbrk.c
87 ${CMAKE_CURRENT_SOURCE_DIR}/string/strspn.c
88 ${CMAKE_CURRENT_SOURCE_DIR}/string/atoi64.c
89 ${CMAKE_CURRENT_SOURCE_DIR}/string/atoi.c
90 ${CMAKE_CURRENT_SOURCE_DIR}/string/atol.c
91 ${CMAKE_CURRENT_SOURCE_DIR}/string/itoa.c
92 ${CMAKE_CURRENT_SOURCE_DIR}/string/itow.c
93 ${CMAKE_CURRENT_SOURCE_DIR}/string/mbstowcs_nt.c
94 ${CMAKE_CURRENT_SOURCE_DIR}/string/splitp.c
95 ${CMAKE_CURRENT_SOURCE_DIR}/string/strtol.c
96 ${CMAKE_CURRENT_SOURCE_DIR}/string/strtoul.c
97 ${CMAKE_CURRENT_SOURCE_DIR}/string/strtoull.c
98 ${CMAKE_CURRENT_SOURCE_DIR}/string/wcs.c
99 ${CMAKE_CURRENT_SOURCE_DIR}/string/wcstol.c
100 ${CMAKE_CURRENT_SOURCE_DIR}/string/wcstombs_nt.c
101 ${CMAKE_CURRENT_SOURCE_DIR}/string/wcstoul.c
102 ${CMAKE_CURRENT_SOURCE_DIR}/string/wsplitp.c
103 ${CMAKE_CURRENT_SOURCE_DIR}/string/wtoi64.c
104 ${CMAKE_CURRENT_SOURCE_DIR}/string/wtoi.c
105 ${CMAKE_CURRENT_SOURCE_DIR}/string/wtol.c
106 ${CMAKE_CURRENT_SOURCE_DIR}/wstring/wcsicmp.c
107 ${CMAKE_CURRENT_SOURCE_DIR}/wstring/wcslwr.c
108 ${CMAKE_CURRENT_SOURCE_DIR}/wstring/wcsnicmp.c
109 ${CMAKE_CURRENT_SOURCE_DIR}/wstring/wcsupr.c
110 ${CMAKE_CURRENT_SOURCE_DIR}/wstring/wcscspn.c
111 ${CMAKE_CURRENT_SOURCE_DIR}/wstring/wcsspn.c
112 ${CMAKE_CURRENT_SOURCE_DIR}/wstring/wcsstr.c
113 )
114 else()
115 #TBD
116 endif()
117
118 add_library(libcntpr ${LIBCNTPR_SOURCE})
119 set_property(TARGET libcntpr PROPERTY COMPILE_DEFINITIONS NO_RTL_INLINES _NTSYSTEM_ _NTDLLBUILD_ _LIBCNT_ __CRT__NO_INLINE)
120 add_dependencies(libcntpr psdk)