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 <Florian.LaRoche@gmail.com>
This commit is contained in:
Florian La Roche 2023-08-22 20:06:51 +02:00 committed by Carles Cufí
commit 79d0bf39b8

View file

@ -1,6 +1,7 @@
# Copyright (c) 2023 Intel Corporation # Copyright (c) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
if (CONFIG_ACPI)
set(ACPI_DIR ${ZEPHYR_CURRENT_MODULE_DIR}/) set(ACPI_DIR ${ZEPHYR_CURRENT_MODULE_DIR}/)
set(INC_DIR ${ACPI_DIR}/source/include/) set(INC_DIR ${ACPI_DIR}/source/include/)
set(SRC_DIR ${ACPI_DIR}/source) set(SRC_DIR ${ACPI_DIR}/source)
@ -19,7 +20,6 @@ zephyr_include_directories(
${SRC_DIR}/tools/acpidump/ ${SRC_DIR}/tools/acpidump/
) )
if (CONFIG_ACPI)
zephyr_library() zephyr_library()
add_compile_definitions(__ZEPHYR__) add_compile_definitions(__ZEPHYR__)