1# - Include the VR Juggler runtime files in an installation or built package. 2# 3# VRJUGGLERRUNTIME_BUNDLE 4# VRJUGGLERRUNTIME_BUNDLE_DEBUG - set to yes to include debug dll's as well 5# 6# Requires these CMake modules: 7# FindVRJuggler22 and its dependencies 8# 9# Original Author: 10# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> 11# http://academic.cleardefinition.com 12# Iowa State University HCI Graduate Program/VRAC 13# Updated for VR Juggler 3.0 by: 14# Brandon Newendorp <brandon@newendorp.com> 15 16if(WIN32) 17 option(VRJUGGLERRUNTIME_BUNDLE 18 "Install a local copy of the VR Juggler runtime files with the project." 19 on) 20 option(VRJUGGLERRUNTIME_BUNDLE_DEBUG 21 "Install the VR Juggler debug runtime files as well." 22 off) 23 mark_as_advanced(VRJUGGLERRUNTIME_BUNDLE_DEBUG) 24else() 25 # TODO - how to handle when not on Windows? 26 #option(VRJUGGLERRUNTIME_BUNDLE "Install a local copy of the VR Juggler runtime files with the project." off) 27endif() 28 29mark_as_advanced(VRJUGGLERRUNTIME_BUNDLE VRJUGGLERRUNTIME_BUNDLE_DEBUG) 30 31if(VRJUGGLERRUNTIME_BUNDLE AND VRJUGGLER22_FOUND) 32 if(WIN32) 33 get_filename_component(_vrjlibdir "${VRJ22_LIBRARY_RELEASE}" PATH) 34 get_filename_component(_vrjroot "${_vrjlibdir}/../" ABSOLUTE) 35 36 # TODO - make sure gadgeteer and sonix can find their DSO's at runtime... 37 38 foreach(_dir bin lib) 39 if(VRJUGGLERRUNTIME_BUNDLE_DEBUG) 40 install(DIRECTORY "${_vrjroot}/${_dir}/" 41 DESTINATION bin 42 PATTERN "*.lib" EXCLUDE # exclude static and link libraries 43 PATTERN "*.exe" EXCLUDE # exclude unneeded executables 44 PATTERN "*.py" EXCLUDE # exclude unneeded python executables 45 PATTERN "*.pyc" EXCLUDE # exclude unneeded python executables 46 ) 47 else() 48 install(DIRECTORY ${_vrjroot}/${_dir}/ 49 DESTINATION bin 50 PATTERN "*.lib" EXCLUDE # exclude static and link libraries 51 PATTERN "*.exe" EXCLUDE # exclude unneeded executables 52 PATTERN "*.py" EXCLUDE # exclude unneeded python executables 53 PATTERN "*.pyc" EXCLUDE # exclude unneeded python executables 54 55 PATTERN "*d.dll" EXCLUDE # exclude debug dll's 56 PATTERN "*-gd-*.dll" EXCLUDE # exclude Boost debug dll's 57 ) 58 endif() 59 60 endforeach() 61 62 install(DIRECTORY ${_vrjroot}/share/ 63 DESTINATION share 64 FILES_MATCHING 65 66 # Runtime files 67 PATTERN "*.dll" 68 PATTERN "*.jar" 69 70 # Data files 71 PATTERN "*.wav" 72 PATTERN "*.xml" 73 PATTERN "*.xsl" 74 PATTERN "*.xsd" 75 PATTERN "*.flt" 76 PATTERN "*.dat" 77 PATTERN "*.table" 78 79 80 # Config files 81 PATTERN "*.jdef" 82 PATTERN "*.jconf" 83 PATTERN "*.cfg" 84 PATTERN "hosts.allow" 85 86 # Other Files 87 PATTERN "*.txt" 88 PATTERN "COPYING*" 89 PATTERN "ChangeLog" 90 ) 91 92 endif() 93 94 95 96endif() 97