Procházet zdrojové kódy

Add FOLDER parameter to ctkMacroBuildQtPlugin

If specified, the target(s) associated with designer, icon engine and
style plugins will be added into the specified folder when the project is
configured for an IDE supporting it.

For more details, see http://www.cmake.org/cmake/help/v2.8.9/cmake.html#prop_tgt:FOLDER
Jean-Christophe Fillion-Robin před 10 roky
rodič
revize
ac1370e6f3
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      CMake/ctkMacroBuildQtPlugin.cmake

+ 5 - 1
CMake/ctkMacroBuildQtPlugin.cmake

@@ -27,7 +27,7 @@
 macro(ctkMacroBuildQtPlugin)
   cmake_parse_arguments(MY
     "" # no options
-    "NAME;EXPORT_DIRECTIVE;PLUGIN_DIR" # one value args
+    "NAME;EXPORT_DIRECTIVE;FOLDER;PLUGIN_DIR" # one value args
     "SRCS;MOC_SRCS;UI_FORMS;INCLUDE_DIRECTORIES;TARGET_LIBRARIES;RESOURCES" # multi value args
     ${ARGN}
     )
@@ -143,6 +143,10 @@ macro(ctkMacroBuildQtPlugin)
     )
   target_link_libraries(${lib_name} ${my_libs})
 
+  if(NOT "${MY_FOLDER}" STREQUAL "")
+    set_target_properties(${lib_name} PROPERTIES FOLDER ${MY_FOLDER})
+  endif()
+
   # Install the library
   # CTK_INSTALL_QTPLUGIN_DIR:STRING can be passed when configuring CTK
   # By default, it is the same path as CTK_INSTALL_LIB_DIR