forked from rpavlik/cmake-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BundleVRJ30Runtime.cmake
96 lines (79 loc) · 2.65 KB
/
BundleVRJ30Runtime.cmake
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
# - Include the VR Juggler runtime files in an installation or built package.
#
# VRJUGGLERRUNTIME_BUNDLE
# VRJUGGLERRUNTIME_BUNDLE_DEBUG - set to yes to include debug dll's as well
#
# Requires these CMake modules:
# FindVRJuggler22 and its dependencies
#
# Original Author:
# 2009-2010 Ryan Pavlik <[email protected]> <[email protected]>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
# Updated for VR Juggler 3.0 by:
# Brandon Newendorp <[email protected]>
if(WIN32)
option(VRJUGGLERRUNTIME_BUNDLE
"Install a local copy of the VR Juggler runtime files with the project."
on)
option(VRJUGGLERRUNTIME_BUNDLE_DEBUG
"Install the VR Juggler debug runtime files as well."
off)
mark_as_advanced(VRJUGGLERRUNTIME_BUNDLE_DEBUG)
else()
# TODO - how to handle when not on Windows?
#option(VRJUGGLERRUNTIME_BUNDLE "Install a local copy of the VR Juggler runtime files with the project." off)
endif()
mark_as_advanced(VRJUGGLERRUNTIME_BUNDLE VRJUGGLERRUNTIME_BUNDLE_DEBUG)
if(VRJUGGLERRUNTIME_BUNDLE AND VRJUGGLER22_FOUND)
if(WIN32)
get_filename_component(_vrjlibdir "${VRJ22_LIBRARY_RELEASE}" PATH)
get_filename_component(_vrjroot "${_vrjlibdir}/../" ABSOLUTE)
# TODO - make sure gadgeteer and sonix can find their DSO's at runtime...
foreach(_dir bin lib)
if(VRJUGGLERRUNTIME_BUNDLE_DEBUG)
install(DIRECTORY "${_vrjroot}/${_dir}/"
DESTINATION bin
PATTERN "*.lib" EXCLUDE # exclude static and link libraries
PATTERN "*.exe" EXCLUDE # exclude unneeded executables
PATTERN "*.py" EXCLUDE # exclude unneeded python executables
PATTERN "*.pyc" EXCLUDE # exclude unneeded python executables
)
else()
install(DIRECTORY ${_vrjroot}/${_dir}/
DESTINATION bin
PATTERN "*.lib" EXCLUDE # exclude static and link libraries
PATTERN "*.exe" EXCLUDE # exclude unneeded executables
PATTERN "*.py" EXCLUDE # exclude unneeded python executables
PATTERN "*.pyc" EXCLUDE # exclude unneeded python executables
PATTERN "*d.dll" EXCLUDE # exclude debug dll's
PATTERN "*-gd-*.dll" EXCLUDE # exclude Boost debug dll's
)
endif()
endforeach()
install(DIRECTORY ${_vrjroot}/share/
DESTINATION share
FILES_MATCHING
# Runtime files
PATTERN "*.dll"
PATTERN "*.jar"
# Data files
PATTERN "*.wav"
PATTERN "*.xml"
PATTERN "*.xsl"
PATTERN "*.xsd"
PATTERN "*.flt"
PATTERN "*.dat"
PATTERN "*.table"
# Config files
PATTERN "*.jdef"
PATTERN "*.jconf"
PATTERN "*.cfg"
PATTERN "hosts.allow"
# Other Files
PATTERN "*.txt"
PATTERN "COPYING*"
PATTERN "ChangeLog"
)
endif()
endif()