Browse Source

cmake: Add BUILD_CLI option

Rob Loach 5 năm trước cách đây
mục cha
commit
a400b138de
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      CMakeLists.txt

+ 5 - 1
CMakeLists.txt

@@ -3,10 +3,14 @@ project(gravity VERSION 1.0 LANGUAGES C)
 
 set(CMAKE_C_STANDARD 99)
 
+option(BUILD_CLI "Build the command line interface" ON)
+
 # ----------------------------------------------------------------
 # Library
 add_subdirectory(src)
 
 # ----------------------------------------------------------------
 # Command Line Interface
-add_subdirectory(src/cli)
+if(BUILD_CLI)
+    add_subdirectory(src/cli)
+endif()