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