Sfoglia il codice sorgente

ctkMacroCompilePythonScript - "Copy*PythonFiles" target added appropriately

Instead of added the target only if resources are specifed, the copy
target is added only if file have been copied.
Jean-Christophe Fillion-Robin 14 anni fa
parent
commit
89cfd2e939
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 4 3
      CMake/ctkMacroCompilePythonScript.cmake

+ 4 - 3
CMake/ctkMacroCompilePythonScript.cmake

@@ -62,12 +62,13 @@ MACRO(ctkMacroCompilePythonScript)
                           OUTPUT ${tgt}
                           COMMENT "Copying python resource: ${file}")
     ENDFOREACH()
-
+  ENDIF()
+           
+  IF(copied_files)
     ADD_CUSTOM_TARGET(Copy${MY_TARGET_NAME}PythonFiles
                       ALL
                       DEPENDS ${copied_files})
-  ENDIF()
-                    
+  ENDIF()  
   
   # Byte compile the Python files.
   SET(compile_all_script "${CMAKE_CURRENT_BINARY_DIR}/compile_${MY_TARGET_NAME}_python_scripts.py")