diff --git a/Modules/FindGDAL.cmake b/Modules/FindGDAL.cmake index 2e0a5d0f0e..80d91b2a0a 100644 --- a/Modules/FindGDAL.cmake +++ b/Modules/FindGDAL.cmake @@ -86,7 +86,7 @@ if(UNIX) ) if(GDAL_CONFIG) - exec_program(${GDAL_CONFIG} ARGS --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS) + execute_process(COMMAND ${GDAL_CONFIG} --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS) if(GDAL_CONFIG_LIBS) # treat the output as a command line and split it up