From 5cdcb3113df49bef7e295c0ba2c194387edac05a Mon Sep 17 00:00:00 2001 From: Chad Elliott Date: Wed, 25 Jan 2023 12:24:33 -0600 Subject: Added base projects for various databases. --- config/mongodb.mpb | 7 +++++++ config/msgpack.mpb | 3 +++ config/mysql.mpb | 4 ++-- config/objectbox.mpb | 16 ++++++++++++++++ config/objectivity.mpb | 30 ++++++++++++++++++++++++++++++ config/odb_mysql.mpb | 34 ++++++++++++++++++++++++++++++++++ 6 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 config/mongodb.mpb create mode 100644 config/msgpack.mpb create mode 100644 config/objectbox.mpb create mode 100644 config/objectivity.mpb create mode 100644 config/odb_mysql.mpb diff --git a/config/mongodb.mpb b/config/mongodb.mpb new file mode 100644 index 00000000..104c72a6 --- /dev/null +++ b/config/mongodb.mpb @@ -0,0 +1,7 @@ +// -*- MPC -*- +project: boost_base { + includes += $(MONGODB_ROOT)/include/mongocxx/v_noabi \ + $(MONGODB_ROOT)/include/bsoncxx/v_noabi + libpaths += $(MONGODB_ROOT)/lib + lit_libs += mongocxx mongoc-1.0 bsoncxx bson-1.0 +} diff --git a/config/msgpack.mpb b/config/msgpack.mpb new file mode 100644 index 00000000..d5bd71c8 --- /dev/null +++ b/config/msgpack.mpb @@ -0,0 +1,3 @@ +project { + includes += $(MSGPACK_ROOT)/include +} diff --git a/config/mysql.mpb b/config/mysql.mpb index b9d90160..da355a73 100644 --- a/config/mysql.mpb +++ b/config/mysql.mpb @@ -1,6 +1,6 @@ // -*- MPC -*- project { - includes += $(MYSQL_ROOT)/include/mysql - libpaths += $(MYSQL_ROOT)/lib/mysql + includes += $(MYSQL_ROOT)/include $(MYSQL_ROOT)/include/mysql + libpaths += $(MYSQL_ROOT)/lib $(MYSQL_ROOT)/lib/mysql lit_libs += mysqlclient } diff --git a/config/objectbox.mpb b/config/objectbox.mpb new file mode 100644 index 00000000..db42c338 --- /dev/null +++ b/config/objectbox.mpb @@ -0,0 +1,16 @@ +// -*- MPC -*- +project { + Define_Custom(objectbox) { + command = $(OBJECTBOX_ROOT)/bin/objectbox-generator + commandflags = -cpp + pch_postrule = 1 + inputext = .fbs + pre_extension = .obx + source_outputext = .cpp + header_outputext = .hpp + } + + includes += $(OBJECTBOX_ROOT)/include + libpaths += $(OBJECTBOX_ROOT)/lib + lit_libs += objectbox +} diff --git a/config/objectivity.mpb b/config/objectivity.mpb new file mode 100644 index 00000000..99dae80d --- /dev/null +++ b/config/objectivity.mpb @@ -0,0 +1,30 @@ +// -*- MPC -*- +project { + // For some reason, Objectivity names things differently on Windows + specific(prop:windows) { + lit_libs += oodbi ooco + ooddl = ooddlx + } else { + lit_libs += oo ooco + ooddl = ooddl_int + } + + Define_Custom(ddl) { + command = $(OBJECTIVITY_ROOT)/bin/$(OODDL) + commandflags = -I$(OBJECTIVITY_ROOT)/include + pch_postrule = 1 + inputext = .ddl + source_pre_extension = _ddl + header_pre_extension = , _ref + source_outputext = .cpp + header_outputext = .h + } + + includes += $(OBJECTIVITY_ROOT)/include + libpaths += $(OBJECTIVITY_ROOT)/lib + + specific(prop:microsoft) { + // Including causes this warning + DisableSpecificWarnings += 4251 + } +} diff --git a/config/odb_mysql.mpb b/config/odb_mysql.mpb new file mode 100644 index 00000000..9da902bd --- /dev/null +++ b/config/odb_mysql.mpb @@ -0,0 +1,34 @@ +// -*- MPC -*- +project: mysql { + Define_Custom(odb) { + automatic_in = 0 + output_follows_input = 0 + command = $(ODB_ROOT)/bin/odb + commandflags = -d mysql --generate-query --generate-schema \ + --odb-file-suffix .odb --sql-file-suffix .odb + pch_postrule = 1 + inputext = .h, .hpp, .hxx, .hh + pre_extension = .odb + source_outputext = .cxx + inline_outputext = .ixx + header_outputext = .hxx + documentation_outputext = .sql + } + + macros += DATABASE_MYSQL LIBODB_MYSQL_INCLUDE_SHORT + includes += $(ODB_ROOT) + libpaths += $(ODB_ROOT)/lib + + specific(prop:windows) { + macros += WIN32_LEAN_AND_MEAN + Debug::lit_libs += odb-d odb-mysql-d + Release::lit_libs += odb odb-mysql + } else { + lit_libs += odb odb-mysql + } + + specific(prop:microsoft) { + // Ignore unrecognized pragma's and non-exported base class + DisableSpecificWarnings += 4068 4275 + } +} -- cgit v1.2.1