34 lines
1.5 KiB
Diff
34 lines
1.5 KiB
Diff
source: https://svnweb.freebsd.org/ports/head/cad/freecad/files/patch-CMakeLists.txt?revision=504361&view=co
|
|
|
|
--- CMakeLists.txt.orig
|
|
+++ CMakeLists.txt
|
|
@@ -989,6 +989,13 @@ endif()
|
|
endif()
|
|
endif()
|
|
|
|
+ # pyside2 changed it's cmake files, this is the dance we have
|
|
+ # to dance to be compatible with the old and the new versions
|
|
+ if(SHIBOKEN_PYTHON_INCLUDE_DIRS AND NOT SHIBOKEN_INCLUDE_DIR)
|
|
+ get_property(SHIBOKEN_INCLUDE_DIR TARGET Shiboken2::libshiboken PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
|
+ get_property(SHIBOKEN_LIBRARY TARGET Shiboken2::libshiboken PROPERTY IMPORTED_LOCATION_RELEASE)
|
|
+ endif(SHIBOKEN_PYTHON_INCLUDE_DIRS AND NOT SHIBOKEN_INCLUDE_DIR)
|
|
+
|
|
if(NOT SHIBOKEN_INCLUDE_DIR)
|
|
MESSAGE("====================\n"
|
|
"shiboken2 not found.\n"
|
|
@@ -996,6 +1003,14 @@ endif()
|
|
endif(NOT SHIBOKEN_INCLUDE_DIR)
|
|
|
|
find_package(PySide2 QUIET)# REQUIRED
|
|
+
|
|
+ # pyside2 changed it's cmake files, this is the dance we have
|
|
+ # to dance to be compatible with the old and the new versions
|
|
+ if(NOT PYSIDE_INCLUDE_DIR)
|
|
+ get_property(PYSIDE_INCLUDE_DIR TARGET PySide2::pyside2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
|
+ get_property(PYSIDE_LIBRARY TARGET PySide2::pyside2 PROPERTY IMPORTED_LOCATION_RELEASE)
|
|
+ endif(NOT PYSIDE_INCLUDE_DIR)
|
|
+
|
|
if(NOT PYSIDE_INCLUDE_DIR)
|
|
MESSAGE("==================\n"
|
|
"PySide2 not found.\n"
|