termux-packages/packages/moria/CMakeLists.txt.patch

53 lines
1.6 KiB
Diff

--- ../CMakeLists.txt.orig 2019-04-28 08:12:04.338201376 +0200
+++ ./CMakeLists.txt 2019-04-28 08:43:34.081455683 +0200
@@ -156,16 +156,12 @@
#
# Set up the install paths and files
#
-set(build_dir "umoria")
+option(build_dir "Directory for build files" "umoria")
set(data_dir "${build_dir}/data")
file(MAKE_DIRECTORY ${build_dir})
file(MAKE_DIRECTORY ${data_dir})
-set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR})
-set(EXECUTABLE_OUTPUT_PATH ${build_dir})
-set(RUNTIME_OUTPUT_DIRECTORY ${build_dir})
-
# Core game data files
set(
data_files
@@ -241,7 +237,7 @@
set(resources ${data_files} ${support_files})
# Also add resources to the target so they are visible in the IDE
-add_executable(umoria ${source_files} ${resources})
+add_executable(moria ${source_files} ${resources})
# This is horrible, but needed bacause `find_package()` doesn't use the
@@ -265,7 +261,20 @@
endif ()
include_directories(${CURSES_INCLUDE_DIR})
-target_link_libraries(umoria ${CURSES_LIBRARIES})
+target_link_libraries(moria ${CURSES_LIBRARIES})
# Build and install the umoria binary
-install(TARGETS umoria DESTINATION ${build_dir})
+install(TARGETS moria DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+install(FILES docs/manual.md docs/faq.md LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/moria/)
+install(FILES
+ data/death_royal.txt
+ data/death_tomb.txt
+ data/help.txt
+ data/help_wizard.txt
+ data/rl_help.txt
+ data/rl_help_wizard.txt
+ data/scores.dat
+ data/splash.txt
+ data/welcome.txt
+ data/versions.txt
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/games/moria/)