Skip to content

Commit

Permalink
Fix up cmake stuff with help from franciscod and convert to PIL.
Browse files Browse the repository at this point in the history
  • Loading branch information
boombatower committed Nov 3, 2014
1 parent aa114b3 commit 0fd13dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -53,6 +53,7 @@ doxygen_configure(cpp/ py/)

add_subdirectory(cpp/)
add_subdirectory(py/)
add_subdirectory(assets/)

# process the included python sources, generate setup.py
process_python_modules()
Expand Down
9 changes: 6 additions & 3 deletions assets/CMakeLists.txt
@@ -1,9 +1,12 @@
message("Cropping gaben.png to create placeholder icon...")
message("Cropping gaben.png to create placeholder desktop icon...")

execute_process(convert -crop 512x512+92+137 gaben.png "${CMAKE_BINARY_DIR}/assets/dist/openage.png")
execute_process(COMMAND python3 -c "
import PIL.Image;
cropped=PIL.Image.open('${GLOBAL_ASSET_DIR}/gaben.png').crop((92,137,604,649));
cropped.save('${CMAKE_BINARY_DIR}/dist/openage.png')")

install(FILES ${GLOBAL_ASSET_DIR}/dist/openage.desktop
DESTINATION ${CMAKE_INSTALL_PREFIX}/usr/share/applications)

install(FILES ${CMAKE_BINARY_DIR}/assets/dist/openage.png
install(FILES ${CMAKE_BINARY_DIR}/dist/openage.png
DESTINATION ${CMAKE_INSTALL_PREFIX}/usr/share/pixmaps)

0 comments on commit 0fd13dd

Please sign in to comment.