Skip to content

Commit

Permalink
#14329: Force C++11 when Qt 5.7+ is found and remove the need to set …
Browse files Browse the repository at this point in the history
…WANT_CPP11 in this case

git-svn-id: svn://scribus.net/trunk/Scribus@21469 11d20701-8431-0410-a711-e3c959e3b870
  • Loading branch information
Craig Bradney committed Oct 26, 2016
1 parent 8457e2f commit fafe5f5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,6 @@ ELSE (APPLEBUNDLE)
ENDIF (APPLEBUNDLE)
ADD_DEFINITIONS("-DLIBDIR=\\\"${CMAKE_INSTALL_PREFIX}/${LIBDIR}\\\"")

#C++11 Support
IF(WANT_CPP11)
MESSAGE(STATUS "Enabling C++11 compiler features")
set(CMAKE_CXX_STANDARD 11)
ENDIF(WANT_CPP11)

#PLUGINS
IF(WIN32)
SET(PLUGINDIR "plugins")
Expand Down Expand Up @@ -661,10 +655,18 @@ ADD_DEFINITIONS(${Qt5PrintSupport_DEFINITIONS})

MESSAGE(STATUS "Qt VERSION: ${Qt5Widgets_VERSION}")
IF (NOT WANT_CPP11 AND Qt5Widgets_VERSION_MAJOR EQUAL 5 AND Qt5Widgets_VERSION_MINOR GREATER 6)
MESSAGE(FATAL_ERROR "Your Qt version is at least 5.7.0, please set CMake command line option -DWANT_CPP11=1 for C++ 11 and Qt 5.7.0 support")
MESSAGE(STATUS "Your Qt version is 5.7.0 or superior, enabling C++11 compiler features")
SET(WANT_CPP11 1)
ENDIF (NOT WANT_CPP11 AND Qt5Widgets_VERSION_MAJOR EQUAL 5 AND Qt5Widgets_VERSION_MINOR GREATER 6)
#>> Qt


#C++11 Support
IF(WANT_CPP11)
MESSAGE(STATUS "Enabling C++11 compiler features")
set(CMAKE_CXX_STANDARD 11)
ENDIF(WANT_CPP11)

#<< ZLIB, PNG
IF (WIN32)
# On win32 we can use Qt's zlib and libpng, so we use some
Expand Down

0 comments on commit fafe5f5

Please sign in to comment.