From 79d0bf39b8402f2b59fbcad2860e2a25c270545e Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Tue, 22 Aug 2023 20:06:51 +0200 Subject: [PATCH] modules/acpica: CMakeLists.txt: move conditional to beginning of file Move the conditional compile of CONFIG_ACPI to the beginning of the file as we currently add compiler include paths to all projects even if CONFIG_ACPI is not set. Signed-off-by: Florian La Roche --- modules/acpica/CMakeLists.txt | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/acpica/CMakeLists.txt b/modules/acpica/CMakeLists.txt index 17aed310448..2c77a6c1633 100644 --- a/modules/acpica/CMakeLists.txt +++ b/modules/acpica/CMakeLists.txt @@ -1,25 +1,25 @@ # Copyright (c) 2023 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -set(ACPI_DIR ${ZEPHYR_CURRENT_MODULE_DIR}/) -set(INC_DIR ${ACPI_DIR}/source/include/) -set(SRC_DIR ${ACPI_DIR}/source) -set(COMP_DIR ${ACPI_DIR}/source/components) -set(PARENT_SRC_DIR ${ACPI_DIR}../../zephyr) -set(ACPI_PARENT_DIR ${ACPI_DIR}/../) - -zephyr_include_directories( - ${PARENT_SRC_DIR}/include/ - ${ACPI_PARENT_DIR}/ - ${INC_DIR}/ - ${INC_DIR}/platform/ - ${SRC_DIR}/compiler/ - ${ZEPHYR_CURRENT_MODULE_DIR}/generate/zephyr/ - ${SRC_DIR}/tools/acpiexec/ - ${SRC_DIR}/tools/acpidump/ -) - if (CONFIG_ACPI) + set(ACPI_DIR ${ZEPHYR_CURRENT_MODULE_DIR}/) + set(INC_DIR ${ACPI_DIR}/source/include/) + set(SRC_DIR ${ACPI_DIR}/source) + set(COMP_DIR ${ACPI_DIR}/source/components) + set(PARENT_SRC_DIR ${ACPI_DIR}../../zephyr) + set(ACPI_PARENT_DIR ${ACPI_DIR}/../) + + zephyr_include_directories( + ${PARENT_SRC_DIR}/include/ + ${ACPI_PARENT_DIR}/ + ${INC_DIR}/ + ${INC_DIR}/platform/ + ${SRC_DIR}/compiler/ + ${ZEPHYR_CURRENT_MODULE_DIR}/generate/zephyr/ + ${SRC_DIR}/tools/acpiexec/ + ${SRC_DIR}/tools/acpidump/ + ) + zephyr_library() add_compile_definitions(__ZEPHYR__)