summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-05-16 00:47:12 +0200
committerSlávek Banko <slavek.banko@axis.cz>2019-05-16 00:47:46 +0200
commit2ab7135063301ee8b165b30f275522c918a04ee7 (patch)
tree265285a31d2aaa5b2784fd41a86f38a8ef746b1b
parent587c08cc3ff9524c541ea84fc40409896919ebb9 (diff)
downloadtdegames-2ab7135063301ee8b165b30f275522c918a04ee7.tar.gz
tdegames-2ab7135063301ee8b165b30f275522c918a04ee7.zip
cmake: Removed useless usage of
`get_target_property( BIN2C_EXE bin2c LOCATION)` This resolves the CMake warning on CMP0026. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--ksokoban/images/CMakeLists.txt10
-rw-r--r--ksokoban/levels/CMakeLists.txt4
2 files changed, 6 insertions, 8 deletions
diff --git a/ksokoban/images/CMakeLists.txt b/ksokoban/images/CMakeLists.txt
index c8ec74a9..5345f0ff 100644
--- a/ksokoban/images/CMakeLists.txt
+++ b/ksokoban/images/CMakeLists.txt
@@ -20,10 +20,10 @@ include_directories(
# compilation, If it is possible in
# generall.
-add_executable( bin2c bin2c.c )
-target_link_libraries( bin2c z )
-
-get_target_property( BIN2C_EXE bin2c LOCATION)
+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
@@ -33,7 +33,7 @@ foreach( _img goal.png halfstone_1.png halfstone_2.png halfstone_3.png
endforeach( )
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/data.c
- COMMAND "${BIN2C_EXE}" \"\" ${IMAGES}
+ COMMAND bin2c \"\" ${IMAGES}
DEPENDS bin2c ${IMAGES}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)
diff --git a/ksokoban/levels/CMakeLists.txt b/ksokoban/levels/CMakeLists.txt
index 1847d3ec..b11a6a7a 100644
--- a/ksokoban/levels/CMakeLists.txt
+++ b/ksokoban/levels/CMakeLists.txt
@@ -9,11 +9,9 @@
#
##################################################
-get_target_property( BIN2C_EXE bin2c LOCATION)
-
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/data.c
COMMAND
- "${BIN2C_EXE}" \"\" "${CMAKE_CURRENT_SOURCE_DIR}/level.data"
+ bin2c \"\" "${CMAKE_CURRENT_SOURCE_DIR}/level.data"
DEPENDS bin2c ${CMAKE_CURRENT_SOURCE_DIR}/level.data
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)