Skip to content

Commit e9076f4

Browse files
committed
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.
1 parent 03e9fbf commit e9076f4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ option(DHT_BOOTSTRAP "Enable building of DHT_bootstrap" ON)
161161
option(BOOTSTRAP_DAEMON "Enable building of tox-bootstrapd" ON)
162162
if(BOOTSTRAP_DAEMON AND WIN32)
163163
message(WARNING "Building tox-bootstrapd for Windows is not supported, disabling")
164-
set(BOOTSTRAP_DAEMON OFF)
164+
set(BOOTSTRAP_DAEMON OFF CACHE BOOL "" FORCE)
165165
endif()
166166

167167
option(BUILD_FUZZ_TESTS "Build fuzzing harnesses" OFF)
@@ -177,18 +177,19 @@ include(Dependencies)
177177

178178
if(MUST_BUILD_TOXAV)
179179
set(NO_TOXAV_ERROR_TYPE SEND_ERROR)
180+
set(BUILD_TOXAV ON CACHE BOOL "" FORCE)
180181
else()
181182
set(NO_TOXAV_ERROR_TYPE WARNING)
182183
endif()
183184

184185
if(BUILD_TOXAV)
185186
if(NOT OPUS_FOUND)
186187
message(${NO_TOXAV_ERROR_TYPE} "Option BUILD_TOXAV is enabled but required library OPUS was not found.")
187-
set(BUILD_TOXAV OFF)
188+
set(BUILD_TOXAV OFF CACHE BOOL "" FORCE)
188189
endif()
189190
if(NOT VPX_FOUND)
190191
message(${NO_TOXAV_ERROR_TYPE} "Option BUILD_TOXAV is enabled but required library VPX was not found.")
191-
set(BUILD_TOXAV OFF)
192+
set(BUILD_TOXAV OFF CACHE BOOL "" FORCE)
192193
endif()
193194
endif()
194195

@@ -597,7 +598,7 @@ if(BOOTSTRAP_DAEMON)
597598
add_subdirectory(other/bootstrap_daemon)
598599
else()
599600
message(WARNING "Option BOOTSTRAP_DAEMON is enabled but required library LIBCONFIG was not found.")
600-
set(BOOTSTRAP_DAEMON OFF)
601+
set(BOOTSTRAP_DAEMON OFF CACHE BOOL "" FORCE)
601602
endif()
602603
endif()
603604

0 commit comments

Comments
 (0)