add the obelisk library source

This commit is contained in:
Chris Cromer 2023-02-16 01:16:57 -03:00
parent 7b515f1f07
commit f6e93a1b67
Signed by: cromer
GPG Key ID: FA91071797BEEEC2
7 changed files with 44 additions and 10 deletions

View File

@ -864,7 +864,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
INPUT = @TOP_SRCDIR@/src
INPUT = @TOP_SRCDIR@/src @TOP_SRCDIR@/lib @TOP_SRCDIR@/include
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@ -2237,7 +2237,9 @@ SEARCH_INCLUDES = YES
INCLUDE_PATH = @TOP_SRCDIR@/src \
@TOP_SRCDIR@/src/ast \
@TOP_SRCDIR@/src/models
@TOP_SRCDIR@/src/models \
@TOP_SRCDIR@/lib \
@TOP_SRCDIR@/include
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the

14
include/version.h.in Normal file
View File

@ -0,0 +1,14 @@
namespace obelisk
{
/**
* @brief The current version of obelisk.
*
*/
const std::string version = "@version@";
/**
* @brief The current library version of obelisk.
*
*/
const std::string soVersion = "@so_version@";
} // namespace obelisk

20
lib/meson.build Normal file
View File

@ -0,0 +1,20 @@
conf_data = configuration_data()
conf_data.set('version', meson.project_version())
conf_data.set('so_version', project_version_lib)
configure_file(input : 'version.h.in',
output : 'version.h',
configuration : conf_data
)
obelisk_lib_sources = files(
)
sqlite3 = dependency('sqlite3')
library('obelisk',
obelisk_lib_sources,
dependencies : [sqlite3],
version : meson.project_version(),
soversion : project_version_lib,
install : true
)

1
lib/version.h.in Symbolic link
View File

@ -0,0 +1 @@
../include/version.h.in

View File

@ -9,6 +9,8 @@ project('obelisk',
]
)
project_version_lib = '0'
llvm = dependency('llvm', version: '>= 14.0.0', modules : ['core', 'target', 'mcjit', 'nativecodegen'], required : true, method: 'config-tool')
cdata = configuration_data()
@ -27,4 +29,5 @@ if docs_enabled
endif
endif
subdir('lib')
subdir('src')

View File

@ -1,5 +1,6 @@
conf_data = configuration_data()
conf_data.set('version', meson.project_version())
conf_data.set('so_version', project_version_lib)
configure_file(input : 'version.h.in',
output : 'version.h',
configuration : conf_data

View File

@ -1,8 +0,0 @@
namespace obelisk
{
/**
* @brief The current version of obelisk.
*
*/
std::string version = "@version@";
} // namespace obelisk

1
src/version.h.in Symbolic link
View File

@ -0,0 +1 @@
../include/version.h.in