Sort plug-in embedded resources (#3014)
This commit is contained in:
committed by
GitHub
parent
5eb0ae2d75
commit
5626a49704
@@ -13,6 +13,18 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME)
|
||||
|
||||
LIST(LENGTH PLUGIN_EMBEDDED_RESOURCES ER_LEN)
|
||||
IF(ER_LEN)
|
||||
# Expand and sort arguments to avoid locale dependent sorting in
|
||||
# shell
|
||||
SET(NEW_ARGS)
|
||||
FOREACH(ARG ${PLUGIN_EMBEDDED_RESOURCES})
|
||||
FILE(GLOB EXPANDED "${ARG}")
|
||||
LIST(SORT EXPANDED)
|
||||
FOREACH(ITEM ${EXPANDED})
|
||||
LIST(APPEND NEW_ARGS ${ITEM})
|
||||
ENDFOREACH()
|
||||
ENDFOREACH()
|
||||
SET(PLUGIN_EMBEDDED_RESOURCES ${NEW_ARGS})
|
||||
|
||||
SET(ER_H ${CMAKE_CURRENT_BINARY_DIR}/embedded_resources.h)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${ER_H}
|
||||
COMMAND ${BIN2RES}
|
||||
|
||||
Reference in New Issue
Block a user