From 654c7191870b1cb1345046cd590d885b16186e12 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Sun, 19 Dec 2021 16:09:16 -0500 Subject: [PATCH] Add MCPI_OPEN_SOURCE_ONLY Build Option --- CMakeLists.txt | 1 + dependencies/CMakeLists.txt | 4 +++- docs/BUILDING.md | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5772eb1f..bfe9097e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ option(MCPI_SERVER_MODE "Server Mode" FALSE) option(MCPI_HEADLESS_MODE "Headless Mode" ${MCPI_SERVER_MODE}) set(MCPI_BUILD_MODE "both" CACHE STRING "\"arm\" = Build Only Code That Must Be ARM; \"native\" = Build Architecture-Independent Code; \"both\" = Build All Code As ARM") set_property(CACHE MCPI_BUILD_MODE PROPERTY STRINGS "both" "arm" "native") +option(MCPI_OPEN_SOURCE_ONLY "Only Install Open-Source Code (Will Result In Broken Install)" FALSE) # Configure Build Mode if(MCPI_BUILD_MODE STREQUAL "arm") diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt index 797df730..f9d1bc7c 100644 --- a/dependencies/CMakeLists.txt +++ b/dependencies/CMakeLists.txt @@ -5,4 +5,6 @@ add_subdirectory(zlib) # LibPNG add_subdirectory(libpng) # Minecraft: Pi Edition -add_subdirectory(minecraft-pi) +if(NOT MCPI_OPEN_SOURCE_ONLY) + add_subdirectory(minecraft-pi) +endif() diff --git a/docs/BUILDING.md b/docs/BUILDING.md index 545303bb..0a1b7986 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -14,6 +14,9 @@ * ``MCPI_USE_MEDIA_LAYER_PROXY`` * ``ON``: Enable The Media Layer Proxy * ``OFF`` (Default): Disable The Media Layer Proxy +* ``MCPI_OPEN_SOURCE_ONLY`` + * ``ON``: Only Install Open-Source Code (Will Result In Broken Install) + * ``OFF`` (Default): Install All Code ## Build Dependencies * Common