Bug 430399

Summary: cmake searches unused dependency
Product: [Applications] kpimtextedit Reporter: rezso <rezso>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal CC: montel
Priority: NOR    
Version: git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description rezso 2020-12-14 22:39:22 UTC
CMakeLists.txt contains KF5IconThemes as required package, but KF5IconThemes not used by kpimtextedit.
Comment 1 Laurent Montel 2020-12-15 05:49:56 UTC
Hi,
src/composer-ng/autotests/richtextcomposertest.cpp still uses it.

Regards
Comment 2 rezso 2020-12-20 00:18:02 UTC
I compile all components with -DBUILD_TESTING=FALSE option.
So I think, a conditional search is the best solution:

if(BUILD_TESTING)
   find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Test)
   find_package(KF5IconThemes ${KF5_MIN_VERSION} CONFIG REQUIRED)
   add_definitions(-DBUILD_TESTING)
endif()