浏览代码

CMake: Don't try to enable install options if no languages are enabled

This removes a CMake dev warning when building serenity via the
Superbuild.
Andrew Kaster 1 年之前
父节点
当前提交
0052f9e895
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      Meta/CMake/lagom_install_options.cmake

+ 6 - 0
Meta/CMake/lagom_install_options.cmake

@@ -1,5 +1,11 @@
 include_guard()
 
+# Skip trying to setup install rules if no languages are enabled, such as in the Superbuild.
+get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
+if (NONE IN_LIST languages)
+    return()
+endif()
+
 include(GNUInstallDirs) # make sure to include before we mess w/RPATH
 
 # Mirror the structure of the installed tree to ensure that rpaths