1
2#uncomment this if you want to test c++ compilation
3#add_subdirectory(test)
4
5list(APPEND SOURCE
6    src/allocators.cpp
7    src/bitset.cpp
8    src/codecvt.cpp
9    src/collate.cpp
10    src/complex.cpp
11    src/complex_io.cpp
12    src/complex_trig.cpp
13    src/ctype.cpp
14    src/dll_main.cpp
15    src/facets_byname.cpp
16    src/fstream.cpp
17    src/ios.cpp
18    src/iostream.cpp
19    src/istream.cpp
20    src/locale.cpp
21    src/locale_catalog.cpp
22    src/locale_impl.cpp
23    src/messages.cpp
24    src/monetary.cpp
25    src/num_get.cpp
26    src/num_get_float.cpp
27    src/num_put.cpp
28    src/num_put_float.cpp
29    src/numpunct.cpp
30    src/ostream.cpp
31    src/sstream.cpp
32    src/stdio_streambuf.cpp
33    src/string.cpp
34    src/strstream.cpp
35    src/time_facets.cpp
36    src/stlport_prefix.h)
37
38add_library(stlport
39    ${SOURCE}
40    src/cxa.c
41    src/c_locale.c)
42
43if(USE_CLANG_CL)
44    target_compile_options(stlport PRIVATE -Wno-missing-braces -Wno-unused-local-typedef)
45    target_compile_options(stlport PRIVATE -Wno-infinite-recursion -Wno-deprecated-register)
46    target_compile_options(stlport PRIVATE -Wno-tautological-unsigned-zero-compare)
47endif()
48
49target_include_directories(stlport PRIVATE ${REACTOS_SOURCE_DIR}/sdk/include/c++/stlport)
50target_compile_definitions(stlport PRIVATE
51    _STLP_USE_EXCEPTIONS _DLL __USE_CRTIMP
52    _BUILD_STLPORT NATIVE_CPP_INCLUDE=${REACTOS_SOURCE_DIR}/sdk/include/c++)
53
54target_include_directories(stlport INTERFACE "$<$<COMPILE_LANGUAGE:CXX>:${REACTOS_SOURCE_DIR}/sdk/include/c++/stlport>")
55target_compile_definitions(stlport INTERFACE "$<$<COMPILE_LANGUAGE:CXX>:NATIVE_CPP_INCLUDE=${REACTOS_SOURCE_DIR}/sdk/include/c++>")
56set_target_cpp_properties(stlport WITH_EXCEPTIONS WITH_RTTI)
57
58add_dependencies(stlport xdk)
59add_pch(stlport src/stlport_prefix.h SOURCE)
60