diff options
Diffstat (limited to 'ksokoban')
-rw-r--r-- | ksokoban/CMakeLists.txt | 41 | ||||
-rw-r--r-- | ksokoban/data/CMakeLists.txt | 10 | ||||
-rw-r--r-- | ksokoban/images/CMakeLists.txt | 43 | ||||
-rw-r--r-- | ksokoban/levels/CMakeLists.txt | 23 |
4 files changed, 117 insertions, 0 deletions
diff --git a/ksokoban/CMakeLists.txt b/ksokoban/CMakeLists.txt new file mode 100644 index 00000000..6ffa3316 --- /dev/null +++ b/ksokoban/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################# +# +# (C) 2016 Alexander Golubev +# fatzer2 (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( images ) +add_subdirectory( data ) +add_subdirectory( levels ) + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/levels + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### ksokoban (executable) ##################### + +tde_add_executable( ksokoban AUTOMOC + SOURCES Bookmark.cpp History.cpp HtmlPrinter.cpp ImageData.cpp + InternalCollections.cpp LevelCollection.cpp LevelMap.cpp MainWindow.cpp + Map.cpp MapDelta.cpp ModalLabel.cpp Move.cpp MoveSequence.cpp + PathFinder.cpp PlayField.cpp StaticImage.cpp main.cpp + LINK tdecore-shared tdeui-shared tdeio-shared tdeio-shared + DESTINATION ${BIN_INSTALL_DIR} + DEPENDENCIES ksokoban_levels_data_c + ksokoban_images_data_c +) diff --git a/ksokoban/data/CMakeLists.txt b/ksokoban/data/CMakeLists.txt new file mode 100644 index 00000000..e1114b1b --- /dev/null +++ b/ksokoban/data/CMakeLists.txt @@ -0,0 +1,10 @@ +# This file is genereted by trinity-automake-cmake-convert script by Fat-Zer + +tde_install_icons( ksokoban ) + + +##### other data ################################ + +install( FILES ksokoban.desktop + DESTINATION ${XDG_APPS_INSTALL_DIR} +) 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 +) diff --git a/ksokoban/levels/CMakeLists.txt b/ksokoban/levels/CMakeLists.txt new file mode 100644 index 00000000..1847d3ec --- /dev/null +++ b/ksokoban/levels/CMakeLists.txt @@ -0,0 +1,23 @@ +################################################# +# +# (C) 2016 Alexander Golubev +# fatzer2 (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################## + +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" + DEPENDS bin2c ${CMAKE_CURRENT_SOURCE_DIR}/level.data + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) + +add_custom_target ( ksokoban_levels_data_c + DEPENDS data.c +) |