瀏覽代碼

Add support for FOLDER target property to custom targets

Fixes: #18372
Luca Cappa 5 年之前
父節點
當前提交
353405daef
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Source/cmTarget.cxx

+ 2 - 1
Source/cmTarget.cxx

@@ -358,7 +358,6 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
     initProp("CUDA_RESOLVE_DEVICE_SYMBOLS");
     initProp("LINK_SEARCH_START_STATIC");
     initProp("LINK_SEARCH_END_STATIC");
-    initProp("FOLDER");
     initProp("Swift_LANGUAGE_VERSION");
     initProp("Swift_MODULE_DIRECTORY");
     initProp("VS_JUST_MY_CODE_DEBUGGING");
@@ -390,6 +389,8 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
   }
 
   if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY) {
+    initProp("FOLDER");
+
     if (this->GetGlobalGenerator()->IsXcode()) {
       initProp("XCODE_GENERATE_SCHEME");
     }