mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-03 19:13:39 +00:00
Show guidance if the framework is not found
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
0c3f0e998d
commit
f9bbe0de4c
@ -277,6 +277,9 @@ if(LIB_INSTALL_DIR)
|
||||
set(CMAKE_INSTALL_LIBDIR "${LIB_INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/framework/CMakeLists.txt")
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_SOURCE_DIR}/framework/CMakeLists.txt not found. Run `git submodule update --init` from the source tree to fetch the submodule contents.")
|
||||
endif()
|
||||
add_subdirectory(framework)
|
||||
|
||||
add_subdirectory(include)
|
||||
|
@ -2,6 +2,14 @@ ifndef MBEDTLS_PATH
|
||||
MBEDTLS_PATH := ..
|
||||
endif
|
||||
|
||||
ifeq (,$(wildcard $(MBEDTLS_PATH)/framework/exported.make))
|
||||
define error_message
|
||||
$(MBEDTLS_PATH)/framework/exported.make not found.
|
||||
Run `git submodule update --init` to fetch the submodule contents.
|
||||
This is a fatal error
|
||||
endef
|
||||
$(error $(error_message))
|
||||
endif
|
||||
include $(MBEDTLS_PATH)/framework/exported.make
|
||||
|
||||
# Also see "include/mbedtls/mbedtls_config.h"
|
||||
|
@ -4,6 +4,16 @@ ifndef MBEDTLS_PATH
|
||||
MBEDTLS_PATH := ..
|
||||
endif
|
||||
|
||||
ifeq (,$(wildcard $(MBEDTLS_PATH)/framework/exported.make))
|
||||
# Use the define keyword to get a multi-line message.
|
||||
# GNU make appends ". Stop.", so tweak the ending of our message accordingly.
|
||||
define error_message
|
||||
$(MBEDTLS_PATH)/framework/exported.make not found.
|
||||
Run `git submodule update --init` to fetch the submodule contents.
|
||||
This is a fatal error
|
||||
endef
|
||||
$(error $(error_message))
|
||||
endif
|
||||
include $(MBEDTLS_PATH)/framework/exported.make
|
||||
|
||||
CFLAGS ?= -O2
|
||||
|
Loading…
x
Reference in New Issue
Block a user