diff --git a/README.md b/README.md index 9f0e042..5dacb50 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,17 @@ You can enable certain features by doing the following: export EXQLITE_SYSTEM_CFLAGS=-DSQLITE_ENABLE_DBSTAT_VTAB=1 ``` +Or you can pass extra environment variables using the Elixir config: + +```elixir +config :exqlite, + force_build: true, + make_env: %{ + "EXQLITE_SYSTEM_CFLAGS" => "-DSQLITE_ENABLE_DBSTAT_VTAB=1", + "V" => "1" + } +``` + ### Listing Flags Used For Compilation If you `export V=1` the flags used for compilation will be output to stdout. diff --git a/mix.exs b/mix.exs index db79d94..57ae8b8 100644 --- a/mix.exs +++ b/mix.exs @@ -21,6 +21,7 @@ defmodule Exqlite.MixProject do versions: ["2.15", "2.16", "2.17"], availability: &target_available_for_nif_version?/2 ], + make_env: Application.get_env(:exqlite, :make_env, %{}), cc_precompiler: cc_precompiler(), start_permanent: Mix.env() == :prod, aliases: aliases(),