Bug 296867

Summary: kdenetwork claims that QCA2 is optional, but kget requires it
Product: [Applications] kget Reporter: Jonathan Marten <jjm>
Component: generalAssignee: KGet authors <kget>
Status: RESOLVED FIXED    
Severity: normal CC: uwolfer
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Suggested patch
Patch to fix this

Description Jonathan Marten 2012-03-27 10:48:04 UTC
The top level CMakeLists.txt for kdenetwork checks for the optional presence of QCA2:

macro_optional_find_package(QCA2)
macro_log_feature(QCA2_FOUND "QCA2" "Qt Cryptographic Architecture" "http://delta.affinix.com/qca" FALSE "2.0.0" "Needed for the KGet bittorrent-plugin and some Kopete plugins")

and indeed does not complain if it is not found:

-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
-----------------------------------------------------------------------------
   * QCA2 (2.0.0 or higher)  <http://delta.affinix.com/qca>
     Qt Cryptographic Architecture
     Needed for the KGet bittorrent-plugin and some Kopete plugins

However, the kget/tests appears to unconditionally require QCA2:

#===========Verifier===========
kde4_add_unit_test(verifiertest
  TESTNAME kget-verifiertest
  verifiertest.cpp
)
target_link_libraries(verifiertest ${QT_QTTEST_LIBRARY} ${KDE4_KDECORE_LIBS} ${QCA2_LIBRARIES} kgetcore)

and the configuration fails if QCA2 is not available:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
QCA2_LIBRARIES (ADVANCED)
    linked by target "verifiertest" in directory /ws/trunk/kdenetwork/kget/tests
-- Configuring incomplete, errors occurred!

The optional/required status should be consistent between kdenetwork and kget.
Comment 1 Jonathan Marten 2012-03-27 10:54:54 UTC
Created attachment 69932 [details]
Suggested patch

Since the tests are not required for building...
Comment 2 Lukas Appelhans 2012-04-05 12:33:36 UTC
Created attachment 70175 [details]
Patch to fix this

Hey :)
I fixed the problem in another way. Please comment if it works for you, then I will commit :)
Thanks,
Lukas
Comment 3 Jonathan Marten 2012-04-16 19:34:27 UTC
With patch as in comment #2 applied, configures and builds correctly.
Many thanks for the fix!
Comment 4 Lukas Appelhans 2012-04-17 16:05:09 UTC
I commited the fix :)

Lukas
Comment 5 Lukas Appelhans 2013-01-13 12:52:32 UTC
This was fixed in rev 1290111.

Lukas