summaryrefslogtreecommitdiffstats
path: root/Modules/FindPkgConfig.cmake
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <daniele.domenichelli@iit.it>2015-02-26 16:26:12 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-27 15:59:23 (GMT)
commita7631fc4e026f2e330b10eae73f473f240c3d0c1 (patch)
treed51c0ee64c296bedf59e18db82821457f93f3b66 /Modules/FindPkgConfig.cmake
parent4efef3f775e78bdcb4591dc37aa974bc28e8fd84 (diff)
downloadCMake-a7631fc4e026f2e330b10eae73f473f240c3d0c1.zip
CMake-a7631fc4e026f2e330b10eae73f473f240c3d0c1.tar.gz
CMake-a7631fc4e026f2e330b10eae73f473f240c3d0c1.tar.bz2
Modules: Check for ARGC before using ARGV#
ARGV# could be defined from a parent scope.
Diffstat (limited to 'Modules/FindPkgConfig.cmake')
-rw-r--r--Modules/FindPkgConfig.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index bf58ede..64ccde5 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -143,7 +143,7 @@ endmacro()
# - _pkgconfig_add_extra_path(_extra_paths ENV VAR)
function(_pkgconfig_add_extra_path _extra_paths_var _var)
set(_is_env 0)
- if(_var STREQUAL "ENV")
+ if(ARGC GREATER 2 AND _var STREQUAL "ENV")
set(_var ${ARGV2})
set(_is_env 1)
endif()