Ticket #877: navit-r5005-cmake-fix.patch

File navit-r5005-cmake-fix.patch, 1.1 KB (added by themroc.myopenid.com, 8 years ago)
  • navit/xpm/CMakeLists.txt

    diff -Nru3 -x .svn -x .deps -x .libs -x '*~' -x '*.orig' -x '*.rej' -x '*.tmp' -x '*.log' -x '*.mo' -x '*.po' -x '*.a' -x '*.o' -x '*.lo' -x '*.la' -x '*.png' -x Makefile -x Makefile.in -x autom4te.cache -x config.status -x configure -x ABOUT-NLS navit-r5005-orig/navit/xpm/CMakeLists.txt navit-r5005-cmake/navit/xpm/CMakeLists.txt
    old new  
    7777
    7878FILE(GLOB XPM_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.xpm")
    7979if(XPM2PNG)
    80    list(APPEND FILES_TO_PNG ${XPM_FILES})
     80   foreach (IMAGE_SRC ${SVG_FILES})
     81      string(REGEX REPLACE ".[a-z]*\$" "" IMAGE ${IMAGE_SRC})
     82      list(APPEND SVG_LIST ${IMAGE})
     83   endforeach()
     84   foreach (IMAGE_SRC ${XPM_FILES})
     85      string(REGEX REPLACE ".[a-z]*\$" "" IMAGE ${IMAGE_SRC})
     86      list(FIND SVG_LIST ${IMAGE} DUP_IMG)
     87      if ( ${DUP_IMG} LESS 0 )
     88         list(APPEND FILES_TO_PNG ${IMAGE_SRC})
     89      endif()
     90   endforeach()
    8191else()
    8292   list(APPEND IMAGE_TARGETS ${XPM_FILES})
    8393endif(XPM2PNG)