Don't look for a package when we don't need to

This commit is contained in:
Jeffrey Pfau 2014-10-07 02:54:05 -07:00
parent bc2979679e
commit 7b4d4e438a
1 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,9 @@ include_directories(${CMAKE_SOURCE_DIR}/src)
# Function definitions
include(FindPkgConfig)
function(find_feature FEATURE_NAME FEATURE_REQUIRES)
if (NOT ${FEATURE_NAME})
return()
endif()
foreach(REQUIRE ${FEATURE_REQUIRES})
find_package(${REQUIRE} QUIET)
pkg_search_module(${REQUIRE} ${REQUIRE})