]> Pileus Git - ~andy/sunrise/blob - games-engines/openmw/files/openmw-0.13.0-cmake.patch
fix changelogs
[~andy/sunrise] / games-engines / openmw / files / openmw-0.13.0-cmake.patch
1 From: hasufell <julian.ospald@googlemail.com>
2 Date: Sun Apr  8 18:48:34 UTC 2012
3
4 add proper install rules
5
6 --- CMakeLists.txt
7 +++ CMakeLists.txt
8 @@ -32,6 +32,14 @@
9  option(USE_MPG123 "use mpg123 + libsndfile for sound" ON)
10  
11  find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
12 +
13 +# paths
14 +set(BINDIR "bin" CACHE PATH "Where to install binaries")
15 +set(DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE PATH "Sets the root of data directories to a non-default location")
16 +set(DATADIR "${CMAKE_INSTALL_PREFIX}/share/openmw" CACHE PATH "Sets the openmw data directories to a non-default location")
17 +set(DOCDIR "${DATAROOTDIR}/doc/openmw" CACHE PATH "Sets the doc directory to a non-default location.")
18 +set(MANDIR "${DATAROOTDIR}/man" CACHE PATH "Where to install manpages")
19 +set(SYSCONFDIR "" CACHE PATH "Set config dir")
20  
21  # Location of morrowind data files
22  if(DPKG_PROGRAM)
23 @@ -42,8 +50,8 @@
24          set(MORROWIND_DATA_FILES "./data" CACHE PATH "location of Morrowind data files")
25          set(MORROWIND_RESOURCE_FILES "./resources" CACHE PATH "location of OpenMW resources files")
26      else()
27 -        set(MORROWIND_DATA_FILES "data" CACHE PATH "location of Morrowind data files")
28 -        set(MORROWIND_RESOURCE_FILES "resources" CACHE PATH "location of OpenMW resources files")
29 +        set(MORROWIND_DATA_FILES "/usr/share/games/openmw/data/" CACHE PATH "location of Morrowind data files")
30 +        set(MORROWIND_RESOURCE_FILES "${DATADIR}/resources" CACHE PATH "location of OpenMW resources files")
31      endif(APPLE)
32  endif(DPKG_PROGRAM)
33  
34 @@ -574,3 +582,23 @@
35  set(CMAKE_CXX_FLAGS "-arch i386")
36  
37  endif (APPLE)
38 +
39 +
40 +## Linux building
41 +
42 +# Install binaries
43 +INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/openmw" DESTINATION ${BINDIR} )
44 +INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/omwlauncher" DESTINATION ${BINDIR} )
45 +INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/esmtool" DESTINATION ${BINDIR} )
46 +
47 +# Install icon
48 +INSTALL(FILES "${OpenMW_SOURCE_DIR}/apps/launcher/resources/images/openmw.png" DESTINATION "share/pixmaps/")
49 +
50 +# Install global configuration files
51 +INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION ${SYSCONFDIR} RENAME "openmw.cfg" )
52 +INSTALL(FILES "${OpenMW_BINARY_DIR}/plugins.cfg" DESTINATION ${SYSCONFDIR} )
53 +INSTALL(FILES "${OpenMW_SOURCE_DIR}/files/launcher.cfg" DESTINATION ${SYSCONFDIR} )
54 +
55 +# Install resources
56 +INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ${DATADIR} )
57 +INSTALL(FILES "${OpenMW_BINARY_DIR}/launcher.qss" DESTINATION "${DATADIR}/resources" )