[libgda/jdbc: 2/3] JDBC: fixes to build system to use java




commit 07ce13bb524920cf231cea5427f53c23ebe3b98b
Author: Daniel Espinosa <esodan gmail com>
Date:   Sun Sep 19 14:41:38 2021 -0500

    JDBC: fixes to build system to use java

 meson.build                |  7 +++----
 providers/jdbc/meson.build | 20 +++++++++++---------
 2 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/meson.build b/meson.build
index 1dd384bec..8b61d7651 100644
--- a/meson.build
+++ b/meson.build
@@ -316,12 +316,11 @@ sqlite_xml_inf = files(sqlite_xml_fnamesext)
 intlmerge = find_program('intltool-merge')
 
 # Jdbc dependencies
+found_jdbc = false
 java_dep = find_program('java')
-jdk_dep = dependency('jdk', version : '>=1.8')
-if jdk_dep.found() and java_dep.found()
+if java_dep.found()
+       add_languages('java')
        found_jdbc = true
-else
-       found_jdbc = false
 endif
 
 dates = compiler.run('''
diff --git a/providers/jdbc/meson.build b/providers/jdbc/meson.build
index cbf99fe94..a50b4264d 100644
--- a/providers/jdbc/meson.build
+++ b/providers/jdbc/meson.build
@@ -29,9 +29,9 @@ foreach fn : jni_filenames
        jni_classes_fnamesext += [fn +'.class']
 endforeach
 
-jni_headers = files(jni_headers_fnamesext)
+jni_headers = jni_headers_fnamesext
 jni_sources = files(jni_sources_fnamesext)
-jni_classes = files(jni_classes_fnamesext)
+jni_classes = jni_classes_fnamesext
 
 jdbc_xml_fnames = [
        'jdbc_specs_dsn',
@@ -84,10 +84,9 @@ jdbc_resourcesh = custom_target('jdbc_resourcesh',
        install: false
        )
 
-resources = [
-       'jdbc-resources.h',
-       'jdbc-resources.c'
-]
+resources = []
+resources += jdbc_resourcesh
+resources += jdbc_resourcesc
 
 libgda_jdbc_sources = files([
        'gda-jdbc-blob-op.c',
@@ -111,7 +110,7 @@ libgda_jdbc_sources = files([
        'jni-wrapper.c'
 ])
 
-libgda_jdbc_sources += jni_headers
+#libgda_jdbc_sources += jni_headers
 libgda_jdbc_sources += jni_sources
 libgda_jdbc_sources += resources
 
@@ -121,7 +120,10 @@ jdbcprov_sources = files([
        'meta.java',
        'derby.java',
        'h2.java',
-       'sqlserver.java',
+       'sqlserver.java'
+])
+
+jdbc_manifest = files([
        'MANIFEST.MF'
 ])
 
@@ -133,7 +135,7 @@ libgda_jdbc_provider_jar = jar(
        install_dir: join_paths(get_option('libdir'), project_package, 'providers')
 )
 
-jdbc_args += [
+jdbc_args = [
        '-include',
        join_paths(gda_top_build, 'config.h'),
        '-DCLASS_PREFIX="GdaJdbc"'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]