Files
tessesframework/cmake/findmbed.cmake
Mike Nolan 313e75b14c
Some checks failed
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-arm64:latest, aarch64-linux-gnu, arm64) (push) Successful in 3m57s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-arm:latest, arm-linux-gnueabihf, arm7) (push) Successful in 3m56s
Build and Deploy on Tag / 🔨 Build for PowerPC (push) Successful in 7m23s
Build and Deploy on Tag / 🔨 Build win32 and update the tap 🍺 (push) Failing after 1m2s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-riscv64:latest, riscv64-linux-gnu, riscv64) (push) Successful in 2m12s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-x64:latest, x86_64-linux-gnu, amd64) (push) Successful in 2m15s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-x86:latest, i386-linux-gnu, 386) (push) Successful in 2m15s
Fix license compliance and fix things up
2026-07-31 18:51:17 -05:00

42 lines
1.3 KiB
CMake

if(TESSESFRAMEWORK_ENABLE_MBED)
if(TESSESFRAMEWORK_FETCHCONTENT)
set(MBEDTLS_FATAL_WARNINGS OFF CACHE INTERNAL "For TessesFramework" FORCE)
set(ENABLE_TESTING OFF CACHE INTERNAL "For TessesFramework" FORCE)
set(ENABLE_PROGRAMS OFF CACHE INTERNAL "For TessesFramework" FORCE)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build static libraries" FORCE)
if(NOT TESSESFRAMEWORK_STATIC)
set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "Build with PIC" FORCE)
endif()
FetchContent_Declare(
mbedtls
URL https://downloads.tesses.net/cache/libraries/source/mbedtls-3.6.4.tar.bz2
)
if(NOT mbedtls_POPULATED)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build static" FORCE)
if(NOT TESSESFRAMEWORK_STATIC)
set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "Build PIC" FORCE)
set(CMAKE_SKIP_INSTALL_RULES ON)
set(DISABLE_PACKAGE_CONFIG_AND_INSTALL ON CACHE BOOL "" FORCE)
endif()
FetchContent_Populate(mbedtls)
if(NOT TESSESFRAMEWORK_STATIC)
install(CODE "set(CMAKE_INSTALL_LOCAL_ONLY TRUE)" ALL_COMPONENTS)
endif()
add_subdirectory(${mbedtls_SOURCE_DIR} ${mbedtls_BINARY_DIR})
if(NOT TESSESFRAMEWORK_STATIC)
set(CMAKE_SKIP_INSTALL_RULES OFF)
endif()
endif()
else()
if(TESSESFRAMEWORK_MBEDTLS_PORTLIB STREQUAL "")
find_package(MbedTLS REQUIRED)
endif()
endif()
endif()