--- CMakeLists.txt.orig 2016-07-14 04:11:40.000000000 -0400 +++ CMakeLists.txt 2016-07-18 11:42:15.787307679 -0400 @@ -204,9 +204,12 @@ # # jq # +include(CheckFunctionExists) + if(NOT WIN32 AND NOT APPLE) option(USE_BUNDLED_JQ "Enable building of the bundled jq" ${USE_BUNDLED_DEPS}) if(NOT USE_BUNDLED_JQ) + check_function_exists(mkstemp HAVE_MKSTEMP) find_path(JQ_INCLUDE jq.h PATH_SUFFIXES jq) find_library(JQ_LIB NAMES jq) if(JQ_INCLUDE AND JQ_LIB) .