From 608cd924758074b9f3e1ba5eab7824d58ff80042 Mon Sep 17 00:00:00 2001 From: Joel Pitt Date: Wed, 3 Jul 2019 13:00:01 +1200 Subject: [PATCH] Conversion to explicit paths for guile extensions --- atom-types/CMakeLists.txt | 2 ++ atom-types/spacetime.scm | 3 ++- octomap/CMakeLists.txt | 2 ++ octomap/octomap.scm | 3 ++- pointmemory/CMakeLists.txt | 2 ++ pointmemory/pointmem.scm | 4 ++-- 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/atom-types/CMakeLists.txt b/atom-types/CMakeLists.txt index 860a78d..d0c40ec 100644 --- a/atom-types/CMakeLists.txt +++ b/atom-types/CMakeLists.txt @@ -20,6 +20,8 @@ INSTALL (TARGETS spacetime-types LIBRARY DESTINATION "lib${LIB_DIR_SUFFIX}/opencog" ) +ADD_GUILE_EXTENSION(SCM_CONFIG spacetime-types "opencog-ext-path-spacetime-types") + ADD_GUILE_MODULE (FILES spacetime.scm ${CMAKE_CURRENT_BINARY_DIR}/spacetime_types.scm diff --git a/atom-types/spacetime.scm b/atom-types/spacetime.scm index 2099f9b..efc22a3 100644 --- a/atom-types/spacetime.scm +++ b/atom-types/spacetime.scm @@ -4,8 +4,9 @@ (define-module (opencog spacetime)) (use-modules (opencog)) +(use-modules (opencog oc-config)) ; Load the C library that calls the nameserver to load the types. -(load-extension "libspacetime-types" "spacetime_types_init") +(load-extension (string-append opencog-ext-path-spacetime-types "libspacetime-types") "spacetime_types_init") (load "spacetime/spacetime_types.scm") diff --git a/octomap/CMakeLists.txt b/octomap/CMakeLists.txt index 6131350..2c17323 100644 --- a/octomap/CMakeLists.txt +++ b/octomap/CMakeLists.txt @@ -28,6 +28,8 @@ INSTALL (FILES DESTINATION "${GUILE_SITE_DIR}/opencog" ) +ADD_GUILE_EXTENSION(SCM_CONFIG octomap-types "opencog-ext-path-octomap-types") + ADD_GUILE_MODULE (FILES ${CMAKE_CURRENT_BINARY_DIR}/octomap_types.scm MODULE_DESTINATION "${GUILE_SITE_DIR}/opencog/spacetime/octomap" diff --git a/octomap/octomap.scm b/octomap/octomap.scm index f26dc3a..edb365a 100644 --- a/octomap/octomap.scm +++ b/octomap/octomap.scm @@ -1,7 +1,8 @@ (define-module (opencog octomap)) (use-modules (srfi srfi-1) (opencog) (opencog exec)) +(use-modules (opencog oc-config)) ; Load the C library that calls the nameserver to load the types. -(load-extension "liboctomap-types" "octomap_types_init") +(load-extension (string-append opencog-ext-path-point-memory "liboctomap-types") "octomap_types_init") (load "spacetime/octomap/octomap_types.scm") diff --git a/pointmemory/CMakeLists.txt b/pointmemory/CMakeLists.txt index 2a41f18..26dadc6 100644 --- a/pointmemory/CMakeLists.txt +++ b/pointmemory/CMakeLists.txt @@ -14,6 +14,8 @@ INSTALL (TARGETS point_memory DESTINATION "lib${LIB_DIR_SUFFIX}/opencog" ) +ADD_GUILE_EXTENSION(SCM_CONFIG point_memory "opencog-ext-path-point-memory") + ADD_GUILE_MODULE (FILES pointmem.scm MODULE_DESTINATION "${GUILE_SITE_DIR}/opencog/pointmem" diff --git a/pointmemory/pointmem.scm b/pointmemory/pointmem.scm index f880a6b..c53ec06 100644 --- a/pointmemory/pointmem.scm +++ b/pointmemory/pointmem.scm @@ -1,5 +1,5 @@ (define-module (opencog pointmem)) -(use-modules (opencog)) +(use-modules (opencog oc-config)) -(load-extension "libpoint_memory" "opencog_ato_pointmem_init") +(load-extension (string-append opencog-ext-path-point-memory "libpoint_memory") "opencog_ato_pointmem_init")