Ver código fonte

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 10 anos atrás
pai
commit
ac1370e6f3
1 arquivos alterados com 5 adições e 1 exclusões
  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