X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Fcmake%2Fscripts%2FLyXCreateImagesResource.cmake;h=2c68b3b5b1761c76e0da889d0b7a708bf6e7245f;hb=6461d6aa1b01a97814020020e260c34c117a2631;hp=f360d1c4a4571c1ca867a01b94f42af9e21d9b06;hpb=aafd52f44167d5510be1ddcb974daa9dae486933;p=lyx.git diff --git a/development/cmake/scripts/LyXCreateImagesResource.cmake b/development/cmake/scripts/LyXCreateImagesResource.cmake index f360d1c4a4..2c68b3b5b1 100644 --- a/development/cmake/scripts/LyXCreateImagesResource.cmake +++ b/development/cmake/scripts/LyXCreateImagesResource.cmake @@ -25,7 +25,7 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # To call this script, one has to provide following parameters -# IMAGES_DIR # root for the directory-tree for .png and .git image files +# IMAGES_DIR # root for the directory-tree for .png, .svgz and .git image files # RESOURCE_NAME # full path of the resulting resource-file # MAPPED_DIR # Path-prefix to be removed from the file name entries @@ -47,13 +47,13 @@ endif() file(GLOB_RECURSE images_png ${IMAGES_DIR}/*.png) file(GLOB_RECURSE images_gif ${IMAGES_DIR}/*.gif) +file(GLOB_RECURSE images_svgz ${IMAGES_DIR}/*.svgz) -set(images ${images_png} ${images_gif}) +set(images ${images_png} ${images_gif} ${images_svgz}) file(REMOVE ${RESOURCE_NAME}) - if(EXISTS ${RESOURCE_NAME}) - message(FATAL_ERROR "Cannot remove file ${RESOURCE_NAME}") - endif() +if(EXISTS ${RESOURCE_NAME}) + message(FATAL_ERROR "Cannot remove file ${RESOURCE_NAME}") endif() file(WRITE ${RESOURCE_NAME} "\n") @@ -65,6 +65,11 @@ foreach (_current_FILE ${images}) file(APPEND ${RESOURCE_NAME} " ${_abs_FILE}\n") endforeach (_current_FILE) +# copy lyx.svg too (and use versioning) +get_filename_component(_abs_FILE "${IMAGES_DIR}/lyx.svg" ABSOLUTE) +string(REGEX REPLACE "${MAPPED_DIR}" "" _file_name ${_abs_FILE}) +file(APPEND ${RESOURCE_NAME} " ${_abs_FILE}\n") + file(APPEND ${RESOURCE_NAME} "\n") file(APPEND ${RESOURCE_NAME} "\n")