Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 7c0a716b authored by Boudewijn Rempt's avatar Boudewijn Rempt

Set the deprecation check for all allowed Qt versions

There might be a smarter way to generate the version string, but
this should work...
parent c6294f47
......@@ -191,14 +191,14 @@ include(MacroJPEG)
###########################################################
function(TestCompileLinkPythonLibs OUTPUT_VARNAME)
include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_INCLUDES ${PYTHON_INCLUDE_PATH})
set(CMAKE_REQUIRED_LIBRARIES ${PYTHON_LIBRARIES})
include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_INCLUDES ${PYTHON_INCLUDE_PATH})
set(CMAKE_REQUIRED_LIBRARIES ${PYTHON_LIBRARIES})
if (MINGW)
set(CMAKE_REQUIRED_DEFINITIONS -D_hypot=hypot)
endif (MINGW)
unset(${OUTPUT_VARNAME} CACHE)
CHECK_CXX_SOURCE_COMPILES("
unset(${OUTPUT_VARNAME} CACHE)
CHECK_CXX_SOURCE_COMPILES("
#include <Python.h>
int main(int argc, char *argv[]) {
Py_InitializeEx(0);
......@@ -223,11 +223,11 @@ if(MINGW)
# This shouldn't happen on Windows...
message(FATAL_ERROR "Python library found but python.exe not found!")
endif (PYTHONINTERP_FOUND)
TestCompileLinkPythonLibs(CAN_USE_PYTHON_LIBS)
if (NOT CAN_USE_PYTHON_LIBS)
message(WARNING "Compiling with Python library failed, please check whether the architecture is correct. Python will be disabled.")
TestCompileLinkPythonLibs(CAN_USE_PYTHON_LIBS)
if (NOT CAN_USE_PYTHON_LIBS)
message(WARNING "Compiling with Python library failed, please check whether the architecture is correct. Python will be disabled.")
unset(PYTHONLIBS_FOUND CACHE)
endif (NOT CAN_USE_PYTHON_LIBS)
endif (NOT CAN_USE_PYTHON_LIBS)
endif (PYTHONLIBS_FOUND)
else(MINGW)
find_package(PythonInterp 3.0)
......@@ -383,6 +383,16 @@ add_definitions(
-DQT_DISABLE_DEPRECATED_BEFORE=0x50900
)
if (${Qt5_VERSION} VERSION_GREATER "5.8.0" )
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x50900)
elseif(${Qt5_VERSION} VERSION_GREATER "5.7.0" )
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x50800)
elseif(${Qt5_VERSION} VERSION_GREATER "5.6.0" )
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x50700)
else()
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x50600)
endif()
add_definitions(-DTRANSLATION_DOMAIN=\"krita\")
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment