From 68cc1e775c7fcad5469308f3064cb269ecd9c095 Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Fri, 17 Feb 2017 16:26:39 +0100 Subject: [PATCH] Fix compilation when included as Elixir dependency (#1526) --- mix.exs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index 3cddbfb01..dd233f9a6 100644 --- a/mix.exs +++ b/mix.exs @@ -57,7 +57,11 @@ defmodule Ejabberd.Mixfile do end defp deps_include(deps) do - Enum.map(deps, fn dep -> "deps/#{dep}/include" end) + base = case Mix.Project.deps_paths()[:ejabberd] do + nil -> "deps" + _ -> ".." + end + Enum.map(deps, fn dep -> base<>"/#{dep}/include" end) end defp cond_deps do