|
optional_find_package(<name>)
e.g.
optional_find_package( ZLIB)
is the same as
option(WITH_ZLIB "Search for ZLIB package" ON)
if (WITH_ZLIB)
find_package(ZLIB)
endif (WITH_ZLIB)
This has the effect that all packages which are searched using this new command can be manually disabled
using "cmake <dir> -DWITH_<name>=OFF" (or using the cmake GUI)
This can be used to disable a package although it exists on the system.
The result <name>_FOUND can be used as usual with find_package() for further testing in the CMakeLists.txt
Alex
CCMAIL: kde-buildsystem@kde.org
svn path=/trunk/KDE/kdelibs/; revision=504336
The following changes were in SVN, but were removed from git:
M pics/CMakeLists.txt
|