From 86c735637e9013cc4334f6a7b642b69144b92204 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Tue, 16 Nov 2021 17:57:54 +0300 Subject: [PATCH] mdbx-cmake: add `MDBX_FORCE_BUILD_AS_MAIN_PROJECT`. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a32f08e..15fb4556 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,6 +93,10 @@ else() endif() if(DEFINED PROJECT_NAME) + option(MDBX_FORCE_BUILD_AS_MAIN_PROJECT "Force libmdbx to full control build options even it added as a subdirectory to your project." OFF) +endif() + +if(DEFINED PROJECT_NAME AND NOT MDBX_FORCE_BUILD_AS_MAIN_PROJECT) set(SUBPROJECT ON) set(NOT_SUBPROJECT OFF) if(NOT MDBX_AMALGAMATED_SOURCE AND NOT DEFINED BUILD_TESTING)