From 381a48f1f88d741c34c9ff3d88002b2d42ba5d22 Mon Sep 17 00:00:00 2001 From: Matthieu Dorier Date: Wed, 22 Apr 2020 13:20:11 +0100 Subject: [PATCH] Making cmake install jx9.h so that the Jx9 API is available to users as well --- CMakeLists.txt | 1 + src/jx9.h | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index efb63a7..f10d27e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR}/src) SET(HEADERS_UNQLITE unqlite.h + src/jx9.h ) SET(SOURCES_UNQLITE diff --git a/src/jx9.h b/src/jx9.h index 399cd9c..88c3b68 100644 --- a/src/jx9.h +++ b/src/jx9.h @@ -96,6 +96,10 @@ */ #define JX9_COPYRIGHT "Copyright (C) Symisc Systems 2012-2013, http://jx9.symisc.net/" +#ifdef __cplusplus +extern "C" { +#endif + /* Forward declaration to public objects */ typedef struct jx9_io_stream jx9_io_stream; typedef struct jx9_context jx9_context; @@ -104,8 +108,20 @@ typedef struct jx9_vfs jx9_vfs; typedef struct jx9_vm jx9_vm; typedef struct jx9 jx9; +#ifdef __cplusplus +} +#endif + #include "unqlite.h" +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef JX9_PRIVATE +#define JX9_PRIVATE +#endif + #if !defined( UNQLITE_ENABLE_JX9_HASH_FUNC ) #define JX9_DISABLE_HASH_FUNC #endif /* UNQLITE_ENABLE_JX9_HASH_FUNC */ @@ -459,4 +475,8 @@ JX9_PRIVATE const char * jx9_lib_signature(void); /*JX9_PRIVATE const char * jx9_lib_ident(void);*/ /*JX9_PRIVATE const char * jx9_lib_copyright(void);*/ +#ifdef __cplusplus +} +#endif + #endif /* _JX9H_ */