Revision: 4877
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4877&view=rev
Author:   ossman_
Date:     2012-03-27 12:33:36 +0000 (Tue, 27 Mar 2012)
Log Message:
-----------
Convert media Makefile to CMake.

Modified Paths:
--------------
    trunk/CMakeLists.txt

Added Paths:
-----------
    trunk/media/CMakeLists.txt

Removed Paths:
-------------
    trunk/media/Makefile

Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt        2012-03-27 12:30:19 UTC (rev 4876)
+++ trunk/CMakeLists.txt        2012-03-27 12:33:36 UTC (rev 4877)
@@ -423,8 +423,11 @@
 if(ENABLE_NLS)
   add_subdirectory(po)
 endif()
+
 add_subdirectory(vncviewer)
 
+add_subdirectory(media)
+
 include(cmake/BuildPackages.cmake)
 
 # uninstall

Added: trunk/media/CMakeLists.txt
===================================================================
--- trunk/media/CMakeLists.txt                          (rev 0)
+++ trunk/media/CMakeLists.txt  2012-03-27 12:33:36 UTC (rev 4877)
@@ -0,0 +1,54 @@
+set(ICON_FILES
+  icons/tigervnc_16.png
+  icons/tigervnc_22.png
+  icons/tigervnc_24.png
+  icons/tigervnc_32.png
+  icons/tigervnc_48.png)
+
+find_program(CONVERT_EXECUTABLE convert)
+
+if(CONVERT_EXECUTABLE)
+  add_custom_target(icons-target ALL DEPENDS ${ICON_FILES})
+
+  if(UNIX AND NOT APPLE)
+    foreach(SIZE 16 22 24 32 48)
+      install(FILES ${CMAKE_CURRENT_BINARY_DIR}/icons/tigervnc_${SIZE}.png
+        DESTINATION ${DATA_DIR}/icons/hicolor/${SIZE}x${SIZE}/apps
+        RENAME tigervnc.png)
+    endforeach()
+    install(FILES icons/tigervnc.svg
+      DESTINATION ${DATA_DIR}/icons/hicolor/scalable/apps)
+  endif()
+endif()
+
+add_custom_command(OUTPUT icons COMMAND mkdir icons)
+
+add_custom_command(OUTPUT icons/tigervnc_16.png
+  COMMAND ${CONVERT_EXECUTABLE} -background transparent
+    ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_16.svg icons/tigervnc_16.png
+  DEPENDS icons ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_16.svg
+  COMMENT "Generating icons/tigervnc_16.png")
+
+add_custom_command(OUTPUT icons/tigervnc_22.png
+  COMMAND ${CONVERT_EXECUTABLE} -size 22x22 xc:none -gravity center 
-background transparent
+    ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_20.svg -composite 
icons/tigervnc_22.png
+  DEPENDS icons ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_20.svg
+  COMMENT "Generating icons/tigervnc_22.png")
+
+add_custom_command(OUTPUT icons/tigervnc_24.png
+  COMMAND ${CONVERT_EXECUTABLE} -size 24x24 xc:none -gravity center 
-background transparent
+    ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_20.svg -composite 
icons/tigervnc_24.png
+  DEPENDS icons ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_20.svg
+  COMMENT "Generating icons/tigervnc_24.png")
+
+add_custom_command(OUTPUT icons/tigervnc_32.png
+  COMMAND ${CONVERT_EXECUTABLE} -size 32x32 xc:none -gravity center 
-background transparent
+    ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_28.svg -composite 
icons/tigervnc_32.png
+  DEPENDS icons ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_28.svg
+  COMMENT "Generating icons/tigervnc_32.png")
+
+add_custom_command(OUTPUT icons/tigervnc_48.png
+  COMMAND ${CONVERT_EXECUTABLE} -size 48x48 xc:none -gravity center 
-background transparent
+    ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_42.svg -composite 
icons/tigervnc_48.png
+  DEPENDS icons ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_42.svg
+  COMMENT "Generating icons/tigervnc_48.png")

Deleted: trunk/media/Makefile
===================================================================
--- trunk/media/Makefile        2012-03-27 12:30:19 UTC (rev 4876)
+++ trunk/media/Makefile        2012-03-27 12:33:36 UTC (rev 4877)
@@ -1,30 +0,0 @@
-all: icons
-
-.PHONY: clean
-clean: clean-icons
-
-ICONS := \
-    icons/tigervnc_16.png \
-    icons/tigervnc_22.png \
-    icons/tigervnc_24.png \
-    icons/tigervnc_32.png \
-    icons/tigervnc_48.png
-
-.PHONY: icons clean-icons
-icons: $(ICONS)
-
-clean-icons:
-       rm -f $(ICONS)
-
-icons/tigervnc_16.png: tigervnc_16.svg
-       convert -background transparent "$<" "$@"
-
-icons/tigervnc_22.png: tigervnc_20.svg
-       convert -size 22x22 xc:none -gravity center -background transparent 
"$<" -composite "$@"
-icons/tigervnc_24.png: tigervnc_20.svg
-       convert -size 24x24 xc:none -gravity center -background transparent 
"$<" -composite "$@"
-icons/tigervnc_32.png: tigervnc_28.svg
-       convert -size 32x32 xc:none -gravity center -background transparent 
"$<" -composite "$@"
-icons/tigervnc_48.png: tigervnc_42.svg
-       convert -size 48x48 xc:none -gravity center -background transparent 
"$<" -composite "$@"
-

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Tigervnc-commits mailing list
Tigervnc-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to