FindGDAL: use execute_process instead of exec_program

This commit is contained in:
Ben Boeckel
2021-02-10 15:18:10 -05:00
parent 08683b1269
commit 1812ec1fcd
+1 -1
View File
@@ -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