blob: 5345f0ff5855d2e00848351a828dbb0bdbc9fd93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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.
tde_add_executable( bin2c
SOURCES bin2c.c
LINK z
)
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 \"\" ${IMAGES}
DEPENDS bin2c ${IMAGES}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)
add_custom_target ( ksokoban_images_data_c
DEPENDS data.c
)
|