From 50e109a9fae3d0b9152b511264244fbe70256409 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sun, 22 Apr 2018 21:20:10 +0800 Subject: [PATCH] guile-json: attempt cmake --- CMakeLists.txt | 6 +++--- borrowed/guile-json/CMakeLists.txt | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 21e7d2c0de..4fff8a2cc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -343,16 +343,16 @@ if (GNC_SRFI64_RESULT EQUAL 0) endif () # Test that guile has guile-json. -execute_process (COMMAND ${GUILE_EXECUTABLE} -c "(use-modules (json builder) (json parser) (json syntax))" +execute_process (COMMAND ${GUILE_EXECUTABLE} -c "(load-from-path \"json.scm\") (use-modules (json builder))" RESULT_VARIABLE GNC_GUILE_JSON - ERROR_QUIET +# 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.") + message (STATUS "guile-json cannot be imported. Abort.") endif () # ############################################################ diff --git a/borrowed/guile-json/CMakeLists.txt b/borrowed/guile-json/CMakeLists.txt index aeb9703b62..fb3a8d1f20 100644 --- a/borrowed/guile-json/CMakeLists.txt +++ b/borrowed/guile-json/CMakeLists.txt @@ -1,9 +1,18 @@ - -GNC_ADD_SCHEME_TARGETS(guile-json +set (guile-json_SCHEME json.scm json/builder.scm json/parser.scm json/syntax.scm -) + ) + +gnc_add_scheme_targets (guile-json + "${guile-json_SCHEME}" + "" + "" + FALSE + ) -SET_DIST_LIST(guile-json_DIST CMakeLists.txt ${guile-json_DATA}) +set_dist_list (guile-json_DIST + CMakeLists.txt + ${guile-json_SCHEME} + )