Explorar o código

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 %!s(int64=10) %!d(string=hai) anos
pai
achega
ac1370e6f3
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  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