kig: fix python scripting
This commit is contained in:
parent
1fc930d4ef
commit
41bf413426
|
@ -17,13 +17,13 @@ index beed7bbb..ed94d104 100644
|
|||
|
||||
-find_package(BoostPython)
|
||||
+find_package(Boost)
|
||||
+find_package(PythonLibs 3.10)
|
||||
+find_package(PythonLibs 3.11)
|
||||
+
|
||||
+if(Boost_FOUND AND PYTHONLIBS_FOUND)
|
||||
+ if(${Boost_VERSION} GREATER 106699)
|
||||
+ if(${Boost_VERSION} GREATER 106699 OR ${Boost_VERSION} VERSION_GREATER_EQUAL 1.67)
|
||||
+ message("Searching for python boost")
|
||||
+ find_package(Boost COMPONENTS python310 REQUIRED)
|
||||
+ set(Boost_PYTHON_LIBRARY ${Boost_PYTHON310_LIBRARY})
|
||||
+ find_package(Boost COMPONENTS python311 REQUIRED)
|
||||
+ set(Boost_PYTHON_LIBRARY ${Boost_PYTHON311_LIBRARY})
|
||||
+ else()
|
||||
+ find_package(Boost COMPONENTS python)
|
||||
+ endif()
|
||||
|
@ -36,11 +36,11 @@ index beed7bbb..ed94d104 100644
|
|||
add_subdirectory( pykig )
|
||||
|
||||
-if(BoostPython_FOUND)
|
||||
+if(Boost_PYTHON310_FOUND AND PYTHONLIBS_FOUND)
|
||||
+if(Boost_PYTHON311_FOUND AND PYTHONLIBS_FOUND)
|
||||
add_subdirectory( scripting )
|
||||
add_definitions(-DKIG_ENABLE_PYTHON_SCRIPTING)
|
||||
-endif(BoostPython_FOUND)
|
||||
+endif(Boost_PYTHON310_FOUND AND PYTHONLIBS_FOUND)
|
||||
+endif(Boost_PYTHON311_FOUND AND PYTHONLIBS_FOUND)
|
||||
|
||||
set_package_properties(
|
||||
BoostPython PROPERTIES
|
||||
|
@ -51,10 +51,10 @@ index beed7bbb..ed94d104 100644
|
|||
-if(BoostPython_FOUND)
|
||||
- include_directories(${BoostPython_INCLUDE_DIRS})
|
||||
-endif(BoostPython_FOUND)
|
||||
+if(Boost_PYTHON310_FOUND OR Boost_PYTHON_FOUND)
|
||||
+if(Boost_PYTHON311_FOUND OR Boost_PYTHON_FOUND)
|
||||
+ include_directories(${Boost_INCLUDE_DIRS})
|
||||
+ include_directories(${PYTHON_INCLUDE_PATH})
|
||||
+endif(Boost_PYTHON310_FOUND OR Boost_PYTHON_FOUND)
|
||||
+endif(Boost_PYTHON311_FOUND OR Boost_PYTHON_FOUND)
|
||||
|
||||
# kigpart
|
||||
|
||||
|
@ -63,7 +63,7 @@ index beed7bbb..ed94d104 100644
|
|||
)
|
||||
|
||||
-if(BoostPython_FOUND)
|
||||
+if(Boost_PYTHON310_FOUND OR Boost_PYTHON_FOUND)
|
||||
+if(Boost_PYTHON311_FOUND OR Boost_PYTHON_FOUND)
|
||||
set(kigpart_PART_SRCS ${kigpart_PART_SRCS}
|
||||
modes/popup/scriptactionsprovider.cc
|
||||
scripting/newscriptwizard.cc
|
||||
|
@ -72,7 +72,7 @@ index beed7bbb..ed94d104 100644
|
|||
|
||||
kde_source_files_enable_exceptions(scripting/python_scripter.cc)
|
||||
-endif(BoostPython_FOUND)
|
||||
+endif(Boost_PYTHON310_FOUND OR Boost_PYTHON_FOUND)
|
||||
+endif(Boost_PYTHON311_FOUND OR Boost_PYTHON_FOUND)
|
||||
|
||||
|
||||
add_library(kigpart MODULE ${kigpart_PART_SRCS})
|
||||
|
@ -83,10 +83,10 @@ index beed7bbb..ed94d104 100644
|
|||
-if(BoostPython_FOUND)
|
||||
- target_link_libraries(kigpart ${BoostPython_LIBRARIES} ${KDE5_KTEXTEDITOR_LIBS})
|
||||
-endif(BoostPython_FOUND)
|
||||
+if(Boost_PYTHON310_FOUND OR Boost_PYTHON_FOUND)
|
||||
+if(Boost_PYTHON311_FOUND OR Boost_PYTHON_FOUND)
|
||||
+ message("testing")
|
||||
+ target_link_libraries(kigpart ${PYTHON_LIBRARIES} ${Boost_PYTHON_LIBRARY} ${KDE5_KTEXTEDITOR_LIBS})
|
||||
+endif(Boost_PYTHON310_FOUND OR Boost_PYTHON_FOUND)
|
||||
+endif(Boost_PYTHON311_FOUND OR Boost_PYTHON_FOUND)
|
||||
|
||||
if (Qt5XmlPatterns_FOUND)
|
||||
target_link_libraries(kigpart Qt5::XmlPatterns)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'kig'
|
||||
pkgname=kig
|
||||
version=22.12.1
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=cmake
|
||||
hostmakedepends="extra-cmake-modules kcoreaddons kdoctools gettext
|
||||
pkg-config qt5-host-tools qt5-qmake"
|
||||
|
|
Loading…
Reference in New Issue