1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-17 11:30:49 +02:00

Fix build of Logger.cpp with an unpatched version of gcc on Windows.

This commit is contained in:
Patrick von Reth
2015-09-04 13:02:46 +02:00
parent 49e0c1bc7a
commit 74b4e2ec16
3 changed files with 15 additions and 3 deletions

View File

@@ -188,7 +188,7 @@ setupLogfile( QFile& f )
}
}
#ifdef _WIN32
#ifdef OFSTREAM_CAN_OPEN_WCHAR_FILE_NAMES
// this is not supported in upstream libstdc++ as shipped with GCC
// GCC needs the patch from https://gcc.gnu.org/ml/libstdc++/2011-06/msg00066.html applied
// we could create a CMake check like the one for taglib, but I don't care right now :P

View File

@@ -1,5 +1,5 @@
ADD_DEFINITIONS( /DNOMINMAX )
ADD_DEFINITIONS( /DWIN32_LEAN_AND_MEAN )
ADD_DEFINITIONS( -DNOMINMAX )
ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN )
ADD_DEFINITIONS( -static-libgcc )
ADD_DEFINITIONS( -DUNICODE )
@@ -21,3 +21,13 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
if(QTSPARKLE_FOUND)
list(APPEND OS_SPECIFIC_LINK_LIBRARIES ${QTSPARKLE_LIBRARIES})
endif()
include(CheckCXXSourceCompiles)
check_cxx_source_compiles( "#include <fstream>
int main(){
ofstream stream(L\"Test\");
return 0;
}"
OFSTREAM_CAN_OPEN_WCHAR_FILE_NAMES)

View File

@@ -27,4 +27,6 @@
#cmakedefine HAVE_VLC_ALBUMARTIST
#cmakedefine HAVE_X11
#cmakedefine OFSTREAM_CAN_OPEN_WCHAR_FILE_NAMES
#endif // CONFIG_H_IN