From e9076f45bd3385e44b32d1e75ee6e3d8afd00c1f Mon Sep 17 00:00:00 2001 From: Green Sky Date: Tue, 16 Jul 2024 11:26:31 +0200 Subject: [PATCH] chore(cmake): set options changes as cache and with force Without this, changes will not propergate to a parent if toxcore is used as a subdirectory. --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f6d37da13..01bb804566 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,7 +161,7 @@ option(DHT_BOOTSTRAP "Enable building of DHT_bootstrap" ON) option(BOOTSTRAP_DAEMON "Enable building of tox-bootstrapd" ON) if(BOOTSTRAP_DAEMON AND WIN32) message(WARNING "Building tox-bootstrapd for Windows is not supported, disabling") - set(BOOTSTRAP_DAEMON OFF) + set(BOOTSTRAP_DAEMON OFF CACHE BOOL "" FORCE) endif() option(BUILD_FUZZ_TESTS "Build fuzzing harnesses" OFF) @@ -177,6 +177,7 @@ include(Dependencies) if(MUST_BUILD_TOXAV) set(NO_TOXAV_ERROR_TYPE SEND_ERROR) + set(BUILD_TOXAV ON CACHE BOOL "" FORCE) else() set(NO_TOXAV_ERROR_TYPE WARNING) endif() @@ -184,11 +185,11 @@ endif() if(BUILD_TOXAV) if(NOT OPUS_FOUND) message(${NO_TOXAV_ERROR_TYPE} "Option BUILD_TOXAV is enabled but required library OPUS was not found.") - set(BUILD_TOXAV OFF) + set(BUILD_TOXAV OFF CACHE BOOL "" FORCE) endif() if(NOT VPX_FOUND) message(${NO_TOXAV_ERROR_TYPE} "Option BUILD_TOXAV is enabled but required library VPX was not found.") - set(BUILD_TOXAV OFF) + set(BUILD_TOXAV OFF CACHE BOOL "" FORCE) endif() endif() @@ -597,7 +598,7 @@ if(BOOTSTRAP_DAEMON) add_subdirectory(other/bootstrap_daemon) else() message(WARNING "Option BOOTSTRAP_DAEMON is enabled but required library LIBCONFIG was not found.") - set(BOOTSTRAP_DAEMON OFF) + set(BOOTSTRAP_DAEMON OFF CACHE BOOL "" FORCE) endif() endif()