- Enable STLPort build on MSVC
- Configure STLPort not to generate static constant definitions (which MSVC doesn't like)
- Link C++ modules to stlport and cpprt as appropriate
- Fix comsupp and atl C++ options
CORE-6950

svn path=/trunk/; revision=59290
This commit is contained in:
Thomas Faber 2013-06-22 15:57:36 +00:00
parent 77ce0c5663
commit e9df952de3
6 changed files with 11 additions and 9 deletions

View file

@ -112,7 +112,9 @@ function(set_module_type_toolchain MODULE TYPE)
if((${TYPE} STREQUAL "kernelmodedriver") OR (${TYPE} STREQUAL "wdmdriver"))
message(FATAL_ERROR "Use of STL in kernelmodedriver or wdmdriver type module prohibited")
endif()
#target_link_libraries(${MODULE} stlport oldnames)
target_link_libraries(${MODULE} cpprt stlport oldnames)
elseif(CPP_USE_RT)
target_link_libraries(${MODULE} cpprt)
endif()
if((${TYPE} STREQUAL "win32dll") OR (${TYPE} STREQUAL "win32ocx") OR (${TYPE} STREQUAL "cpl"))
add_target_link_flags(${MODULE} "/DLL")

View file

@ -214,7 +214,7 @@
// Uncomment to indicate that the compiler do not like static constant
// definition.
// Meaningfull only if _STLP_STATIC_CONST_INIT_BUG is not defined.
// # define _STLP_NO_STATIC_CONST_DEFINITION
# define _STLP_NO_STATIC_CONST_DEFINITION
// Define if default constructor for builtin integer type fails to initialize it to 0
// In expression like new(&char) char():

View file

@ -9,6 +9,8 @@ add_subdirectory(libmpg123)
add_subdirectory(libsamplerate)
add_subdirectory(libwine)
add_subdirectory(libxml2)
# add_subdirectory(stlport) FIXME: Add proper STL support
if(MSVC)
add_subdirectory(stlport)
endif()
add_subdirectory(strmbase)
add_subdirectory(zlib)

View file

@ -2,13 +2,13 @@
#uncomment this if you want to test c++ compilation
#add_subdirectory(test)
set_cpp(WITH_RTTI WITH_EXCEPTIONS WITH_STL)
add_definitions(
-D_STLP_USE_EXCEPTIONS
-D_DLL -D__USE_CRTIMP
-D_BUILD_STLPORT)
set_cpp()
list(APPEND SOURCE
src/allocators.cpp
src/bitset.cpp

View file

@ -1,7 +1,5 @@
if(NOT MSVC)
set_cpp(WITH_RTTI)
endif()
set_cpp(WITH_RTTI)
add_definitions(
-DUNICODE -D_UNICODE

View file

@ -1,5 +1,5 @@
set_cpp(WITH_EXCEPTIONS)
set_cpp(WITH_EXCEPTIONS WITH_STL)
add_library(comsupp comsupp.cpp)
add_dependencies(comsupp psdk)