From patchwork Wed Jul 6 19:10:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Schwartz X-Patchwork-Id: 16565 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 4AF05BD1F1 for ; Wed, 6 Jul 2022 19:17:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 87A116330C; Wed, 6 Jul 2022 21:17:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1657135070; bh=Q/zFsRfGkuUKGh11y30odHNLM6VqyRorM4eyJJW1Kpk=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=IF8ZNwwykTkLpQP6Zmzm1WaVIWVuKQOczZW2uemUyfZ2/xlsMLYL4fhLmb+LpbCCa eDVvaiDuUjpgxTxbspeOlDs1SrPrHpEzt1gCHzKskCwHDXSD4o+B2/pF9td/yg06j5 DMIjjTTGbVzBwv4gP5VpHx/3D7i+Fb1aBeuXXDY8/oPYugUCSan6fHZy4xjBlGqsH5 +zQfNREwo8aT6IARoBnZoKNwTadU0Krf20KzKeOMq5D+y25J3NVilmhzJk3c1ESqEQ x5X9jMkN+yv0X5y6/xYAO8SgCHc/4jtYcGY4pb+zU/WsrTtwflPMNaHYlIJfvKiGgg izA2+oJ8oewow== Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 098B460403 for ; Wed, 6 Jul 2022 21:10:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Q2mir/5/"; dkim-atps=neutral Received: by mail-io1-xd29.google.com with SMTP id z191so14870260iof.6 for ; Wed, 06 Jul 2022 12:10:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=8jpeBeigHBb+erL4vCrkWZn8XgyoUybYCAu4K6Gmqi0=; b=Q2mir/5/cEF8XgSNL023XIBTLT1pTs8GEsCNIK2W+T8fAsKsLF+39dCwstngAthRFj koID9fgvg2BwPQm9wVA9RH44wf8X7ktMlDFScByL75ZhYlSet+0m7pNlDM7I79V4QEDm sFWJqY9GxToyXftU8HqkLfXWAGZXipqtr/YOD05zoNrh0y+QPGishHLKPHO5SOkNedCA MIbzYuE1/H079nH1ZLsHsAmkHYdUOwyWoug1wAi2Uj3qUEOl5JMeAiBeBRB50XTN8AE+ WVd8iwIPlKvzuzS85D/mnMz5VodZpg8lQFOcOJr8aXGxgsSu0itX+mQpkG3b9ft50v8Z BbjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=8jpeBeigHBb+erL4vCrkWZn8XgyoUybYCAu4K6Gmqi0=; b=kn4SnxjhgsauE5F10g4D7XNGWNjVhuWiR8ZSwWR9yIT8gtXg6sTg2VCYbVJEtZzqMV ojzS04iK9m9nuvWZcIdjhzXEmbEM/hr0JAuWFdUJR1/KhIYTDp/9VnAgWl0Ov1xCMwoJ vJZdtS396Cy4V1hgxJgjSbMq8J36Krcu3jdoV6Rjd30BtDHp2kkFJb64hGtKrorwbY+G fjjIdzga0PnQ/nSzkfcFPqVoYoTovk2x9mlukFMTfsOe2MWTCeeIWHNhJkUukurh1rzt lfxwEo72L9CA6splGS6jXOfDzTS11LsvMs6jEi0nzYX5j1XERF8m5OY5KUrOVmp2ZC+x ZNnw== X-Gm-Message-State: AJIora+IT0aRzfDpgEttoH2z380iBnIRo/lGFZvuPeDmkU+a6i4uoqOi Gl7BU0oXT+aOFxcYyRdkGJuBtxxvE+Pn2nYZ X-Google-Smtp-Source: AGRyM1taZpaS3bXU1YNA4/sHE82BEXISJ2B25LXQEjDXRROJ+ukeKz9skA/FBXxs4W0tUViXkBV/Ew== X-Received: by 2002:a5e:a506:0:b0:66a:2cdc:e6f7 with SMTP id 6-20020a5ea506000000b0066a2cdce6f7mr22855519iog.113.1657134618227; Wed, 06 Jul 2022 12:10:18 -0700 (PDT) Received: from didactylos.localdomain ([2600:1700:57f0:ca20:763a:c795:fcf6:91ea]) by smtp.gmail.com with ESMTPSA id l8-20020a927008000000b002dc318249f1sm1225737ilc.0.2022.07.06.12.10.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 12:10:17 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Jul 2022 15:10:16 -0400 Message-Id: <20220706191016.2842476-1-eschwartz93@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 06 Jul 2022 21:17:49 +0200 Subject: [libcamera-devel] [PATCH] meson: correctly pass the global include to the compiler X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Eli Schwartz via libcamera-devel From: Eli Schwartz Reply-To: Eli Schwartz Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" It's not safe to assume `-include config.h` works, since this depends on the functionality of the compiler that the cwd when running the compiler is searched first. When libcamera is included as a Meson subproject, the cwd of the compiler is the cwd of the main project, not of libcamera's build dir, and thus cannot be found. Instead, pass the include filename as a path based on the current build dir. Signed-off-by: Eli Schwartz Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 6d7d3ca6..3f7a3f56 100644 --- a/meson.build +++ b/meson.build @@ -44,7 +44,7 @@ endif common_arguments = [ '-Wshadow', - '-include', 'config.h', + '-include', meson.current_build_dir() / 'config.h', ] c_arguments = []