mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-20 08:27:15 +00:00
cad/freecad: improve pyside2 detection
pyside2 changed the way it reported it's variables (they're cmake target properties now, not variables) sometime over the last releases. FreeCAD did not support pyside2's new way of doing thing, resulting in certain dialogs not working. PR: 237987 Reported by: denverh at comcast dot net
This commit is contained in:
parent
68ff9761a2
commit
7fe1dd4f20
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=504361
@ -2,6 +2,7 @@
|
||||
|
||||
PORTNAME= FreeCAD
|
||||
DISTVERSION= 0.18.2
|
||||
PORTREVISION= 1
|
||||
# use these for bugfixes/snapshots
|
||||
# DISTVERSION= 0.18-16093 # git rev-list --count
|
||||
# DISTVERSIONSUFFIX= -g690774c0e
|
||||
|
31
cad/freecad/files/patch-CMakeLists.txt
Normal file
31
cad/freecad/files/patch-CMakeLists.txt
Normal file
@ -0,0 +1,31 @@
|
||||
--- CMakeLists.txt.orig 2019-06-16 18:08:47 UTC
|
||||
+++ 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"
|
Loading…
Reference in New Issue
Block a user