mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
PyFalkon: Fix build with Qt 5.12.2
BUG: 405833 FIXED-IN: 3.1.1
This commit is contained in:
parent
2743002b2d
commit
479933e095
|
@ -121,11 +121,11 @@ endif()
|
||||||
# Optional: PySide2
|
# Optional: PySide2
|
||||||
find_package(PySide2 "2.0.0")
|
find_package(PySide2 "2.0.0")
|
||||||
find_package(Shiboken2 "2.0.0")
|
find_package(Shiboken2 "2.0.0")
|
||||||
find_package(PythonLibs "3.0")
|
find_package(Python3 COMPONENTS Development)
|
||||||
set_package_properties(PySide2 PROPERTIES DESCRIPTION "Python plugins (experimental)" TYPE OPTIONAL)
|
set_package_properties(PySide2 PROPERTIES DESCRIPTION "Python plugins" TYPE OPTIONAL)
|
||||||
set_package_properties(Shiboken2 PROPERTIES DESCRIPTION "Python plugins (experimental)" TYPE OPTIONAL)
|
set_package_properties(Shiboken2 PROPERTIES DESCRIPTION "Python plugins" TYPE OPTIONAL)
|
||||||
set_package_properties(PythonLibs PROPERTIES DESCRIPTION "Python plugins (experimental)" TYPE OPTIONAL)
|
set_package_properties(Python3 PROPERTIES DESCRIPTION "Python plugins" TYPE OPTIONAL)
|
||||||
if (PySide2_FOUND AND Shiboken2_FOUND AND PythonLibs_FOUND)
|
if (PySide2_FOUND AND Shiboken2_FOUND AND Python3_FOUND)
|
||||||
set(ENABLE_PYTHON_PLUGINS TRUE)
|
set(ENABLE_PYTHON_PLUGINS TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ set(GENERATED_SOURCES_DEPENDENCIES
|
||||||
|
|
||||||
# Add custom target to run shiboken.
|
# Add custom target to run shiboken.
|
||||||
add_custom_command(OUTPUT ${GENERATED_SOURCES}
|
add_custom_command(OUTPUT ${GENERATED_SOURCES}
|
||||||
COMMAND ${SHIBOKEN_BINARY}
|
COMMAND Shiboken2::shiboken2
|
||||||
${SHIBOKEN_OPTIONS} ${GLOBAL_HEADER} ${TYPESYSTEM_FILE}
|
${SHIBOKEN_OPTIONS} ${GLOBAL_HEADER} ${TYPESYSTEM_FILE}
|
||||||
DEPENDS ${GENERATED_SOURCES_DEPENDENCIES}
|
DEPENDS ${GENERATED_SOURCES_DEPENDENCIES}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
@ -144,17 +144,19 @@ add_custom_command(OUTPUT ${GENERATED_SOURCES}
|
||||||
|
|
||||||
# We need to include the headers for the module bindings that we use.
|
# We need to include the headers for the module bindings that we use.
|
||||||
set(PYSIDE_ADDITIONAL_INCLUDES "")
|
set(PYSIDE_ADDITIONAL_INCLUDES "")
|
||||||
foreach(INCLUDE_DIR ${PYSIDE_INCLUDE_DIR})
|
get_target_property(PYSIDE_INCLUDE_DIRS PySide2::pyside2 INTERFACE_INCLUDE_DIRECTORIES)
|
||||||
|
foreach(INCLUDE_DIR ${PYSIDE_INCLUDE_DIRS})
|
||||||
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtCore")
|
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtCore")
|
||||||
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtGui")
|
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtGui")
|
||||||
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtNetwork")
|
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtNetwork")
|
||||||
|
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtPrintSupport")
|
||||||
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtWidgets")
|
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtWidgets")
|
||||||
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtWebChannel")
|
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtWebChannel")
|
||||||
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtWebEngineCore")
|
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtWebEngineCore")
|
||||||
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtWebEngineWidgets")
|
list(APPEND PYSIDE_ADDITIONAL_INCLUDES "${INCLUDE_DIR}/QtWebEngineWidgets")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
set( PyFalkon_SRCS
|
set(PyFalkon_SRCS
|
||||||
pythonplugin.cpp
|
pythonplugin.cpp
|
||||||
${GENERATED_SOURCES}
|
${GENERATED_SOURCES}
|
||||||
)
|
)
|
||||||
|
@ -164,9 +166,6 @@ install(TARGETS PyFalkon DESTINATION ${FALKON_INSTALL_PLUGINDIR})
|
||||||
|
|
||||||
target_include_directories(PyFalkon
|
target_include_directories(PyFalkon
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
|
||||||
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
|
||||||
${PYSIDE_INCLUDE_DIR}
|
|
||||||
${PYSIDE_ADDITIONAL_INCLUDES}
|
${PYSIDE_ADDITIONAL_INCLUDES}
|
||||||
${CMAKE_SOURCE_DIR}
|
${CMAKE_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PyFalkon
|
${CMAKE_CURRENT_BINARY_DIR}/PyFalkon
|
||||||
|
@ -175,10 +174,9 @@ target_include_directories(PyFalkon
|
||||||
target_link_libraries(PyFalkon
|
target_link_libraries(PyFalkon
|
||||||
PRIVATE
|
PRIVATE
|
||||||
FalkonPrivate
|
FalkonPrivate
|
||||||
${PYTHON_LIBRARIES}
|
Shiboken2::libshiboken
|
||||||
${SHIBOKEN_LIBRARY}
|
PySide2::pyside2
|
||||||
${SHIBOKEN_PYTHON_LIBRARIES}
|
Python3::Python
|
||||||
${PYSIDE_LIBRARY}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Same as CONFIG += no_keywords to avoid syntax errors in object.h due to the usage of the word Slot
|
# Same as CONFIG += no_keywords to avoid syntax errors in object.h due to the usage of the word Slot
|
||||||
|
|
Loading…
Reference in New Issue
Block a user