Bug 430399 - cmake searches unused dependency
Summary: cmake searches unused dependency
Status: RESOLVED NOT A BUG
Alias: None
Product: kpimtextedit
Classification: Applications
Component: general (show other bugs)
Version: git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-14 22:39 UTC by rezso
Modified: 2020-12-20 00:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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()