Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modern sqlitecpp #214

Merged
merged 4 commits into from
Sep 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Makefile_sqlitecpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ UNTAR_TEMP_DIR := untar_temp_dir_$(shell echo $$RANDOM)

SQLITECPP_HOME = $(PWD)/$(SQLITECPP_DIR)

include $(BUILD_SCRIPTS)/sqlite_version.mk
ifeq ($(SQLITE_LT_3_19), true)
LEGACY_ON_OR_OFF = ON
else
LEGACY_ON_OR_OFF = OFF
endif

all: $(SQLITECPP_HOME)/sqlitecpp_prereqs.xml

$(TARFILE):
Expand All @@ -58,7 +65,11 @@ $(SQLITECPP_HOME)/.cmake_done: $(SOURCE_CODE_TARGET)
cd $(SQLITECPP_HOME)/build; $(CMAKE) \
-DSQLITECPP_INTERNAL_SQLITE=OFF \
-DSQLITE_USE_LEGACY_STRUCT=ON \
-DCMAKE_INSTALL_PREFIX=$(SQLITECPP_HOME) ..
-DCMAKE_INSTALL_PREFIX=$(SQLITECPP_HOME) \
-DSQLite3_INCLUDE_DIR=$(SQLITE_HOME)/include \
-DSQLite3_LIBRARY=$(SQLITE_HOME)/lib/libsqlite3.so \
-DSQLITE_USE_LEGACY_STRUCT=$(LEGACY_ON_OR_OFF) \
..
date > $@

$(SQLITECPP_HOME)/.make_done: $(SQLITECPP_HOME)/.cmake_done
Expand Down
6 changes: 6 additions & 0 deletions sqlite_version.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ifdef SQLITE_VERSION
SQLITE_MAJOR_VERSION := $(shell echo $(SQLITE_VERSION) | awk -F. '{print $$1}')
SQLITE_MINOR_VERSION := $(shell echo $(SQLITE_VERSION) | awk -F. '{print $$2}')
SQLITE_SUBMINOR_VERSION := $(shell echo $(SQLITE_VERSION) | awk -F. '{print $$3}')
SQLITE_LT_3_19 := $(shell if [[ $(SQLITE_MAJOR_VERSION) -lt 3 || $(SQLITE_MAJOR_VERSION) -eq 3 && $(SQLITE_MINOR_VERSION) -lt 19 ]]; then echo true; else echo false; fi)
endif