diff --git a/CMakeLists.txt b/CMakeLists.txt index fb518ad..d39ab28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,20 @@ if (${SST_JUCEGUI_BUILD_EXAMPLES}) add_library(JUCE INTERFACE) endif () add_subdirectory(examples) + if (${PROJECT_IS_TOP_LEVEL}) + if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + set(OS_COMPILE_OPTIONS + /bigobj + /wd4244 # convert float from double + /wd4305 # truncate from double to float + /wd4018 # signed unsigned compare + /wd4996 # don't warn on stricmp vs _stricmp and other posix names + /wd4267 # converting size_t <-> int + /wd4005 # macro redefinition for nominmax + /utf-8 + ) + endif () + endif() endif () if (NOT TARGET juce::juce_gui_basics) diff --git a/src/sst/jucegui/style/StyleSheet.cpp b/src/sst/jucegui/style/StyleSheet.cpp index 5be2d47..1fa279d 100644 --- a/src/sst/jucegui/style/StyleSheet.cpp +++ b/src/sst/jucegui/style/StyleSheet.cpp @@ -95,7 +95,17 @@ struct StyleSheetBuiltInImpl : public StyleSheet const juce::Font &f) override { jassert(isValidPair(c, p)); + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 4996) +#endif + fonts[c.cname][p.pname] = f; + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif } void replaceFontsWithTypeface(const juce::Typeface::Ptr &p) override