瀏覽代碼

Use configure_file instead of file(WRITE ...) to avoid regeneration.

Sascha Zelzer 14 年之前
父節點
當前提交
5c36963bee
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 1
      CMake/ctkMacroGeneratePluginResourceFile.cmake
  2. 2 0
      CMake/plugin_resources_cached.qrc.in

+ 1 - 1
CMake/ctkMacroGeneratePluginResourceFile.cmake

@@ -37,7 +37,7 @@ MACRO(ctkMacroGeneratePluginResourceFile QRC_SRCS)
   SET(_qrc_content "${_qrc_content}</qresource>
 </RCC>
 ")
-  FILE(WRITE "${_qrc_filepath}" "${_qrc_content}")
+  CONFIGURE_FILE("${CTK_CMAKE_DIR}/plugin_resources_cached.qrc.in" "${_qrc_filepath}" @ONLY)
 
   QT4_ADD_RESOURCES(${QRC_SRCS} ${_qrc_filepath})
 

+ 2 - 0
CMake/plugin_resources_cached.qrc.in

@@ -0,0 +1,2 @@
+@_qrc_content@
+