summaryrefslogtreecommitdiffstats
path: root/ksokoban/images
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2016-02-25 06:23:55 +0300
committerSlávek Banko <slavek.banko@axis.cz>2016-03-14 23:04:06 +0100
commitc70db62d3671e524d23ac974d296eb218159b000 (patch)
tree08d8ed5d0c7c170a7940bcbb80989b99ead98447 /ksokoban/images
parent133cc7035dbdcaf812d8370f729530fa60547f92 (diff)
downloadtdegames-c70db62d3671e524d23ac974d296eb218159b000.tar.gz
tdegames-c70db62d3671e524d23ac974d296eb218159b000.zip
Initial cmake conversion
Diffstat (limited to 'ksokoban/images')
-rw-r--r--ksokoban/images/CMakeLists.txt43
1 files changed, 43 insertions, 0 deletions
diff --git a/ksokoban/images/CMakeLists.txt b/ksokoban/images/CMakeLists.txt
new file mode 100644
index 00000000..e58ecba3
--- /dev/null
+++ b/ksokoban/images/CMakeLists.txt
@@ -0,0 +1,43 @@
+#################################################
+#
+# (C) 2016 Alexander Golubev
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+add_definitions( -DUSE_LIBZ )
+
+# FIXME: that should potentialy break the cross
+# compilation, If it is possible in
+# generall.
+
+add_executable( bin2c bin2c.c )
+target_link_libraries( bin2c z )
+
+get_target_property( BIN2C_EXE bin2c LOCATION)
+
+foreach( _img goal.png halfstone_1.png halfstone_2.png halfstone_3.png
+ halfstone_4.png man.png object.png saveman.png stone_1.png stone_2.png
+ stone_3.png stone_4.png stone_5.png stone_6.png treasure.png starfield.png
+ )
+ list( APPEND IMAGES "${CMAKE_CURRENT_SOURCE_DIR}/${_img}" )
+endforeach( )
+
+add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/data.c
+ COMMAND "${BIN2C_EXE}" \"\" ${IMAGES}
+ DEPENDS bin2c ${IMAGES}
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+)
+
+add_custom_target ( ksokoban_images_data_c
+ DEPENDS data.c
+)