Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/deskutils/charmtimetracker/files/patch-Charm_CMakeLists.txt
16461 views
1
Munge (effectively) -L/usr/local/lib into the link lines.
2
3
QtKeyChain's cmake config lists the libraries it depends on:
4
- a bunch of Qt5 libraries, which are imported targets, and hence
5
already have full paths for CMake
6
- other libraries, like libsecret-1, gio, gobject .. which are not
7
set up as imported targets; these are not found at link-time unless
8
the directory is added to -L. They do have a pkg-config file,
9
so we'll look for (only) libsecret-1 and just add the directory it
10
lives in -- hopefully the other libraries live there too.
11
12
Error message otherwise:
13
14
: && /usr/bin/c++ -O2 -pipe -fstack-protector -fno-strict-aliasing -std=c++0x -fno-exceptions -Wno-gnu-zero-variadic-macro-arguments -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -fdiagnostics-color=always -pedantic -O2 -pipe -fstack-protector -fno-strict-aliasing -Wl,--enable-new-dtags -fstack-protector Charm/CMakeFiles/charmtimetracker.dir/Charm.cpp.o Charm/CMakeFiles/charmtimetracker.dir/qrc_CharmResources.cpp.o Charm/CMakeFiles/charmtimetracker.dir/charmtimetracker_autogen/mocs_compilation.cpp.o -o Charm/charmtimetracker -Wl,-rpath,/usr/local/lib:/usr/local/lib/qt5: Charm/libCharmApplication.a Core/libCharmCore.a /usr/local/lib/libxcb.so /usr/local/lib/libxcb-screensaver.so /usr/local/lib/qt5/libQt5Network.so.5.10.1 /usr/local/lib/qt5/libQt5PrintSupport.so.5.10.1 /usr/local/lib/libqt5keychain.so.0.9.0 -lsecret-1 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl /usr/local/lib/qt5/libQt5DBus.so.5.10.1 /usr/local/lib/qt5/libQt5Widgets.so.5.10.1 /usr/local/lib/qt5/libQt5Gui.so.5.10.1 /usr/local/lib/qt5/libQt5Xml.so.5.10.1 /usr/local/lib/qt5/libQt5Sql.so.5.10.1 /usr/local/lib/qt5/libQt5Core.so.5.10.1 -Wl,-rpath-link,/usr/local/lib && :
15
/usr/bin/ld: cannot find -lsecret-1
16
17
18
--- Charm/CMakeLists.txt.orig 2018-09-01 10:20:52 UTC
19
+++ Charm/CMakeLists.txt
20
@@ -170,6 +170,25 @@ ADD_LIBRARY(
21
${CharmApplication_SRCS} ${UiGenerated_SRCS}
22
)
23
24
+# Need to find support-libraries for qt5keychain
25
+set( CharmExtra_LIBS "" )
26
+include( FindPkgConfig )
27
+pkg_search_module( _lso libsecret-1 )
28
+if( _lso_FOUND )
29
+ find_library( _lso_lib NAMES ${_lso_LIBRARIES} HINTS ${_lso_LIBRARY_DIRS} )
30
+ if ( _lso_lib )
31
+ # The issue is that qtkeychain lists libraries with no
32
+ # imported targets.
33
+ #
34
+ # set( CharmExtra_LIBS ${_lso_lib} )
35
+ link_directories( ${_lso_LIBRARY_DIRS} )
36
+ else()
37
+ message( WARNING "Found libsecret-1, but not ${_lso_LIBRARIES}" )
38
+ endif()
39
+else()
40
+ message( WARNING "Could not find libsecret-1" )
41
+endif()
42
+
43
kde_target_enable_exceptions( CharmApplication PUBLIC )
44
TARGET_LINK_LIBRARIES(CharmApplication ${CharmApplication_LIBS}
45
Qt5::Core
46
47