Modify CMakeLists to test for presence of guile-json

This commit is contained in:
Christopher Lam 2018-04-19 21:57:10 +08:00 committed by Geert Janssens
parent 52d5f0ba2d
commit f2337406a3

View File

@ -342,6 +342,19 @@ if (GNC_SRFI64_RESULT EQUAL 0)
set (HAVE_SRFI64 TRUE)
endif ()
# Test that guile has guile-json.
execute_process (COMMAND ${GUILE_EXECUTABLE} -c "(use-modules (json builder) (json parser) (json syntax))"
RESULT_VARIABLE GNC_GUILE_JSON
ERROR_QUIET
)
if (GNC_GUILE_JSON EQUAL 0)
message (STATUS "guile-json is present.")
set (HAVE_GUILE_JSON TRUE)
else ()
message (FATAL_ERROR "guile-json cannot be imported. Abort.")
endif ()
# ############################################################
IF (WITH_AQBANKING)
GNC_PKG_CHECK_MODULES (GWENHYWFAR REQUIRED gwenhywfar)