1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
configurable install paths
From: eroen <eroen@occam.eroen.eu>
---
CMakeLists.txt | 20 +++++++++++---------
library/CMakeLists.txt | 6 +++---
plugins/ruby/CMakeLists.txt | 4 ++--
3 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 194eec7..4f196c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,30 +68,32 @@ add_definitions(-DDFHACK_VERSION="${DFHACK_VERSION}")
# the dfhack libraries will be installed here:
IF(UNIX)
# put the lib into DF/hack
- SET(DFHACK_LIBRARY_DESTINATION hack)
- SET(DFHACK_EGGY_DESTINATION libs)
+ SET(DFHACK_LIBRARY_DESTINATION hack CACHE PATH "DFHACK_LIBRARY_DESTINATION")
+ SET(DFHACK_EGGY_DESTINATION libs CACHE PATH "DFHACK_EGGY_DESTINATION")
ELSE()
# windows is crap, therefore we can't do nice things with it. leave the libs on a nasty pile...
SET(DFHACK_LIBRARY_DESTINATION .)
SET(DFHACK_EGGY_DESTINATION .)
ENDIF()
# external tools will be installed here:
-SET(DFHACK_BINARY_DESTINATION .)
+SET(DFHACK_BINARY_DESTINATION . CACHE PATH "DFHACK_BINARY_DESTINATION")
# dfhack data goes here:
-SET(DFHACK_DATA_DESTINATION hack)
+SET(DFHACK_DATA_DESTINATION hack CACHE PATH "DFHACK_DATA_DESTINATION")
# plugin libs go here:
-SET(DFHACK_PLUGIN_DESTINATION hack/plugins)
+SET(DFHACK_PLUGIN_DESTINATION hack/plugins CACHE PATH "DFHACK_PLUGIN_DESTINATION")
# dfhack header files go here:
-SET(DFHACK_INCLUDES_DESTINATION hack/include)
+SET(DFHACK_INCLUDES_DESTINATION hack/include CACHE PATH "DFHACK_INCLUDES_DESTINATION")
# dfhack lua files go here:
-SET(DFHACK_LUA_DESTINATION hack/lua)
+SET(DFHACK_LUA_DESTINATION hack/lua CACHE PATH "DFHACK_LUA_DESTINATION")
+# dfhack ruby files go here:
+SET(DFHACK_RUBY_DESTINATION hack/ruby CACHE PATH "DFHACK_RUBY_DESTINATION")
# the windows .lib file goes here:
SET(DFHACK_DEVLIB_DESTINATION hack)
# user documentation goes here:
-SET(DFHACK_USERDOC_DESTINATION hack)
+SET(DFHACK_USERDOC_DESTINATION hack CACHE PATH "DFHACK_USERDOC_DESTINATION")
# developer documentation goes here:
-SET(DFHACK_DEVDOC_DESTINATION hack)
+SET(DFHACK_DEVDOC_DESTINATION hack CACHE PATH "DFHACK_DEVDOC_DESTINATION")
## some options for the user/developer to play with
OPTION(BUILD_LIBRARY "Build the library that goes into DF." ON)
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index 2538360..18635ed 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -302,9 +302,9 @@ IF(UNIX)
else()
# On linux, copy our version of the df launch script which sets LD_PRELOAD
install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack
- DESTINATION .)
+ DESTINATION ${DFHACK_BINARY_DESTINATION})
install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack-run
- DESTINATION .)
+ DESTINATION ${DFHACK_BINARY_DESTINATION})
endif()
ELSE()
if(NOT BUILD_EGGY)
@@ -330,7 +330,7 @@ install(FILES xml/symbols.xml
DESTINATION ${DFHACK_DATA_DESTINATION}) #linux: share/dfhack
#install the example autoexec file
install(FILES ../dfhack.init-example
- DESTINATION ${DFHACK_BINARY_DESTINATION})
+ DESTINATION ${DFHACK_USERDOC_DESTINATION})
install(TARGETS dfhack-run dfhack-client binpatch
LIBRARY DESTINATION ${DFHACK_LIBRARY_DESTINATION}
diff --git a/plugins/ruby/CMakeLists.txt b/plugins/ruby/CMakeLists.txt
index 9d821f9..e6d3eff 100644
--- a/plugins/ruby/CMakeLists.txt
+++ b/plugins/ruby/CMakeLists.txt
@@ -35,7 +35,7 @@ ADD_DEPENDENCIES(ruby ruby-autogen-rb)
INSTALL(FILES ${RUBYLIB} DESTINATION ${DFHACK_LIBRARY_DESTINATION})
INSTALL(DIRECTORY .
- DESTINATION hack/ruby
+ DESTINATION ${DFHACK_RUBY_DESTINATION}
FILES_MATCHING PATTERN "*.rb")
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ruby-autogen.rb DESTINATION hack/ruby)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ruby-autogen.rb DESTINATION ${DFHACK_RUBY_DESTINATION})
|