forked from rpavlik/cmake-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d25566
commit c60a1ea
Showing
11 changed files
with
1,963 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
# - try to find CPPDOM library | ||
# Optionally uses Flagpoll and FindFlagpoll.cmake | ||
# | ||
# CPPDOM_LIBRARY_DIR, library search path | ||
# CPPDOM_INCLUDE_DIR, include search path | ||
# CPPDOM_LIBRARY, the library to link against | ||
# CPPDOM_CXX_FLAGS | ||
# CPPDOM_FOUND, If false, do not try to use this library. | ||
# | ||
# Useful configuration variables you might want to add to your cache: | ||
# CPPDOM_ROOT_DIR - A directory prefix to search | ||
# (a path that contains include/ as a subdirectory) | ||
# CPPDOM_ADDITIONAL_VERSIONS - Additional versions (outside of 0.7.8 to 1.0.0) | ||
# to use when constructing search names and paths | ||
# | ||
# This script will use Flagpoll, if found, to provide hints to the location | ||
# of this library, but does not use the compiler flags returned by Flagpoll | ||
# directly. | ||
# | ||
# VR Juggler requires this package, so this Find script takes that into | ||
# account when determining where to search for the desired files. | ||
# The VJ_BASE_DIR environment variable is searched (preferentially) | ||
# when searching for this package, so most sane VR Juggler build environments | ||
# should "just work." Note that you need to manually re-run CMake if you | ||
# change this environment variable, because it cannot auto-detect this change | ||
# and trigger an automatic re-run. | ||
# | ||
# 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]> | ||
|
||
set(_HUMAN "cppdom") | ||
set(_HEADER cppdom/cppdom.h) | ||
set(_FP_PKG_NAME cppdom) | ||
|
||
set(CPPDOM_VERSIONS | ||
${CPPDOM_ADDITIONAL_VERSIONS} | ||
1.1.2 | ||
1.1.1 | ||
1.1.0 | ||
1.0.2 | ||
1.0.1 | ||
1.0.0 | ||
0.7.10 | ||
0.7.9 | ||
0.7.8) | ||
set(CPPDOM_DIRS) | ||
set(CPPDOM_RELEASE_LIB_NAMES) | ||
set(CPPDOM_DEBUG_LIB_NAMES) | ||
foreach(_version ${CPPDOM_VERSIONS}) | ||
string(REGEX REPLACE "[-\\.]" "_" _versionclean ${_version}) | ||
list(APPEND CPPDOM_DIRS cppdom-${_version}) | ||
list(APPEND CPPDOM_HEADER_DIRS include/cppdom-${_version}) | ||
list(APPEND CPPDOM_RELEASE_LIB_NAMES cppdom-${_versionclean}) | ||
list(APPEND CPPDOM_DEBUG_LIB_NAMES cppdom_d-${_versionclean}) | ||
endforeach() | ||
|
||
include(SelectLibraryConfigurations) | ||
include(CreateImportedTarget) | ||
include(CleanLibraryList) | ||
include(CleanDirectoryList) | ||
|
||
if(CPPDOM_INCLUDE_DIRS AND CPPDOM_LIBRARIES) | ||
# in cache already | ||
set(CPPDOM_FIND_QUIETLY TRUE) | ||
endif() | ||
|
||
# Try flagpoll. | ||
find_package(Flagpoll QUIET) | ||
|
||
if(FLAGPOLL) | ||
flagpoll_get_include_dirs(${_FP_PKG_NAME} NO_DEPS) | ||
flagpoll_get_library_dirs(${_FP_PKG_NAME} NO_DEPS) | ||
flagpoll_get_library_names(${_FP_PKG_NAME} NO_DEPS) | ||
endif() | ||
|
||
set(CPPDOM_ROOT_DIR | ||
"${CPPDOM_ROOT_DIR}" | ||
CACHE | ||
PATH | ||
"Root directory to search for CPPDOM") | ||
if(DEFINED VRJUGGLER30_ROOT_DIR) | ||
mark_as_advanced(CPPDOM_ROOT_DIR) | ||
endif() | ||
if(NOT CPPDOM_ROOT_DIR) | ||
set(CPPDOM_ROOT_DIR "${VRJUGGLER30_ROOT_DIR}") | ||
endif() | ||
|
||
set(_ROOT_DIR "${CPPDOM_ROOT_DIR}") | ||
|
||
find_path(CPPDOM_INCLUDE_DIR | ||
${_HEADER} | ||
HINTS | ||
${_ROOT_DIR} | ||
${${_FP_PKG_NAME}_FLAGPOLL_INCLUDE_DIRS} | ||
PATHS | ||
PATH_SUFFIXES | ||
${CPPDOM_DIRS} | ||
${CPPDOM_HEADER_DIRS} | ||
include | ||
DOC | ||
"Path to ${_HUMAN} includes root") | ||
|
||
find_library(CPPDOM_LIBRARY_RELEASE | ||
NAMES | ||
${CPPDOM_RELEASE_LIB_NAMES} | ||
${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_NAMES} | ||
HINTS | ||
${_ROOT_DIR} | ||
${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} | ||
PATH_SUFFIXES | ||
${_VRJ_LIBSUFFIXES} | ||
DOC | ||
"${_HUMAN} library full path") | ||
|
||
find_library(CPPDOM_LIBRARY_DEBUG | ||
NAMES | ||
${CPPDOM_DEBUG_LIB_NAMES} | ||
HINTS | ||
${_ROOT_DIR} | ||
${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} | ||
PATH_SUFFIXES | ||
${_VRJ_LIBDSUFFIXES} | ||
DOC | ||
"${_HUMAN} debug library full path") | ||
|
||
# Fallback to same library name but in the debug folder | ||
if(NOT CPPDOM_LIBRARY_DEBUG) | ||
find_library(CPPDOM_LIBRARY_DEBUG | ||
NAMES | ||
${CPPDOM_LIB_NAMES} | ||
HINTS | ||
${CPPDOM_INCLUDE_DIR}/../ | ||
${${_FP_PKG_NAME}_FLAGPOLL_LIBRARY_DIRS} | ||
PATH_SUFFIXES | ||
${_VRJ_LIBDSUFFIXES_ONLY} | ||
NO_DEFAULT_PATH | ||
DOC | ||
"${_HUMAN} debug library full path") | ||
endif() | ||
|
||
if(CPPDOM_LIBRARY_RELEASE OR CPPDOM_LIBRARY_DEBUG) | ||
select_library_configurations(CPPDOM) | ||
endif() | ||
|
||
# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if | ||
# all listed variables are TRUE | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(CPPDOM | ||
DEFAULT_MSG | ||
CPPDOM_LIBRARY | ||
CPPDOM_INCLUDE_DIR) | ||
|
||
if(CPPDOM_FOUND) | ||
set(CPPDOM_INCLUDE_DIRS ${CPPDOM_INCLUDE_DIR}) | ||
if(MSVC) | ||
set(CPPDOM_CXX_FLAGS "/wd4290") | ||
endif() | ||
|
||
mark_as_advanced(CPPDOM_ROOT_DIR) | ||
endif() | ||
|
||
mark_as_advanced(CPPDOM_LIBRARY_RELEASE | ||
CPPDOM_LIBRARY_DEBUG | ||
CPPDOM_INCLUDE_DIR) |
Oops, something went wrong.