Skip to content

Commit f76b4c3

Browse files
committed
fix error if there are no meta files
1 parent a2a3f4a commit f76b4c3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ file(REMOVE "${CMAKE_SOURCE_DIR}/Assets/FbxExporters/${MAX_INTEGRATION_ZIP_NAME}
122122
file(GLOB_RECURSE META_FILES "${CMAKE_SOURCE_DIR}/Assets/Integrations/*.meta")
123123

124124
add_custom_command(OUTPUT ${MAYA_INTEGRATION_ZIP_NAME}
125-
COMMAND ${CMAKE_COMMAND} -E remove ${META_FILES}
125+
IF(META_FILES)
126+
COMMAND ${CMAKE_COMMAND} -E remove ${META_FILES}
127+
ENDIF
126128
COMMAND ${CMAKE_COMMAND} -E tar "cfv" ${CMAKE_SOURCE_DIR}/Assets/FbxExporters/${MAYA_INTEGRATION_ZIP_NAME} --format=zip
127129
"${CMAKE_SOURCE_DIR}/Assets/Integrations/Autodesk/maya"
128130
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/Assets
@@ -133,7 +135,9 @@ add_custom_target(${MAYA_INTEGRATION_TARGET} DEPENDS ${MAYA_INTEGRATION_ZIP_NAME
133135

134136

135137
add_custom_command(OUTPUT ${MAX_INTEGRATION_ZIP_NAME}
136-
COMMAND ${CMAKE_COMMAND} -E remove ${META_FILES}
138+
IF(META_FILES)
139+
COMMAND ${CMAKE_COMMAND} -E remove ${META_FILES}
140+
ENDIF
137141
COMMAND ${CMAKE_COMMAND} -E tar "cfv" ${CMAKE_SOURCE_DIR}/Assets/FbxExporters/${MAX_INTEGRATION_ZIP_NAME} --format=zip
138142
"${CMAKE_SOURCE_DIR}/Assets/Integrations/Autodesk/max"
139143
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/Assets

0 commit comments

Comments
 (0)