Fix net-im/spectral build
Recent update to qtkeychain removed the need for the workaround for lousy qtkeychain CMake configuration files -- and made the workaround itself bad. Reported by: fallout
This commit is contained in:
parent
f952e2758d
commit
2abeba29a0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=550440
@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= spectral
|
||||
PORTVERSION= 817
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net-im
|
||||
|
||||
MAINTAINER= adridg@FreeBSD.org
|
||||
|
@ -1,38 +0,0 @@
|
||||
Replace the linked libraries for QtKeychain by expanded ones.
|
||||
|
||||
This is a workaround for QtKeychain installing a Config.cmake file
|
||||
that refers to libraries that are **not** expanded or in the
|
||||
default search path (e.g. glib). Without this expansion,
|
||||
we end up with -lglib in the final link line -- and no
|
||||
corresponding -L/usr/local/lib to make sure it is actually found.
|
||||
|
||||
|
||||
--- CMakeLists.txt.orig 2020-01-11 18:26:51 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -206,6 +210,26 @@ endif(APPLE)
|
||||
add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE
|
||||
${spectral_SRCS} ${spectral_QRC_SRC} $<TARGET_OBJECTS:SortFilterProxyModel>
|
||||
${spectral_WINRC} ${${PROJECT_NAME}_MAC_ICON})
|
||||
+
|
||||
+get_target_property(_libs
|
||||
+ ${QTKEYCHAIN_LIBRARIES}
|
||||
+ IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE)
|
||||
+set(_expanded_libs "")
|
||||
+foreach(d ${_libs})
|
||||
+ if(TARGET ${d})
|
||||
+ list(APPEND _expanded_libs ${d})
|
||||
+ else()
|
||||
+ find_library(_expanded_d ${d})
|
||||
+ if(_expanded_d)
|
||||
+ list(APPEND _expanded_libs ${_expanded_d})
|
||||
+ else()
|
||||
+ list(APPEND _expanded_libs ${d})
|
||||
+ endif()
|
||||
+ unset(_expanded_d)
|
||||
+ endif()
|
||||
+endforeach()
|
||||
+set_target_properties(${QTKEYCHAIN_LIBRARIES} PROPERTIES
|
||||
+ IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE ${_expanded_libs})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
Qt5::Widgets Qt5::Quick Qt5::Qml Qt5::Gui Qt5::Network Qt5::Svg Qt5::QuickControls2
|
Loading…
Reference in New Issue
Block a user