浏览代码

#IQRV #comment [CMake] 添加控件的是否编译选项

gifur 3 年之前
父节点
当前提交
0e216d0665
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 6 1
      CMakeLists.txt
  2. 2 0
      addin/cmake/ConfigOptions.cmake

+ 6 - 1
CMakeLists.txt

@@ -515,7 +515,12 @@ if(BUILD_TOOLS)
 else()
 	message(WARNING "skipping Tool directory.")
 endif(BUILD_TOOLS)
-add_subdirectory(Plugins)
+if(BUILD_PLUGINS)
+	add_subdirectory(Plugins)
+else()
+	message(WARNING "skipping Plugins directory.")
+endif(BUILD_PLUGINS)
+
 if(BUILD_DEVADAPTER)
 	add_subdirectory(DevAdapter)
 else()

+ 2 - 0
addin/cmake/ConfigOptions.cmake

@@ -33,6 +33,8 @@ option(BUILD_MODULE "whether build entity module or not" ON)
 
 option(BUILD_TOOLS "whether build tools or not" ON)
 
+option(BUILD_PLUGINS "whether build plugins or not" ON)
+
 option(BUILD_DEVADAPTER "whether build device adapter or not" ON)
 
 option(WITH_LOCAL_DEVLIB "build dev adapter with local dependency libraries except conan" OFF)