Skip to content

Commit

Permalink
Squashed 'cmake/' changes from b0d0a58..cac13f1
Browse files Browse the repository at this point in the history
cac13f1 Add CMakePackageConfigHelpers as a backported module from 2.8.10
44e17a5 Update help
92f9405 Add FindDirectShow from VRPN
a93bf46 Update FindVRPN
edf459d clean up some modules
0bf8b53 Update documentation/help
900ae37 Improvements to findcppdom
bcdd5ed Adrienne timecode generator finder
fc14864 IDLJ finder/script
5fa91d4 Finder for windows/platform SDK
835a160 Add module to find perl modules: pass them as components
7dc76c3 cleanup
38e2a0d Create a doc_open target to open html docs
e8de008 Improved directx finding
787900c Conditionally use libuuid for VPR22
1c73e35 Add a helper error message to findcppcheck.
9e8b357 Generate, rather than enumerate, juggler lib names.
d42ae48 Add another compiler flag for warnings.
911f522 Just a little cleanup.
a466ea5 Update help
30af184 Add two new scripts written for VR Juggler
09ccc48 Update VR Juggler finders for 3.0.1
f9a5b86 VR JuggLua is no longer unreleased research software - ditch the scary warning.
1adb75e Update GetGitRevisionDescription to handle new submodules a little better.
187b7b2 Add new FindViewPoint
d1ec683 Enhance FindOpenHaptics to handle 3.1
de68fc0 Restore some tabs that went missing
feb11f6 Improve GHOST finder.
b922e06 Update help
7ff9c53 Run cmake-bulk-decrufter.
0873f79 Merge branch 'jscasallas/master'
e2ec7cd Add helpful comment about use as submodule
2a42dc5 Simplify FindQVRPN.
8ddcb84 Windows compatibility for the pull request just merged
4fcc618 Merge pull request #6 from phire/cmake-modules
fa1ef4c Add additional versions of cppdom and gmtl.
7db0714 Regenerate help
39c0f2f Add find directinput
d2e2a74 Update copyright year
5c05172 Update module help
5b62638 Rename to UseMarkdown and add rename feature
f92055a Add markdown scripts (finding and targets)
00cefbe GetGitRevisionDescription: Search parent dirs for .git/
0fb259a New module: FindQVRPN.cmake
9616f6e Find jccl and vrjuggler plugins, and split between debug and release
4856978 Set WIIUSE_RUNTIME_LIBRARY in Wiiuse even not on Windows
d94b209 make FindWinHID work on MinGW.
4c110cb Fix copy-pasteo in findcppunit
8be460a fix doc typo
6a78da3 Handle other compilers better by using compiler ID
a90f87b Use compiler behavior, not identity, to decide what warning flags to use
f03d7a8 Properly check the various arguments to cppcheck rather than assume based on a few tests.
d3ffd8a get git revision more robustly
1fb0e41 update ghost fake stl to simplify header
6fbe007 No more checking the stdc++ version for openhaptics
db11bb9 make sure we actually link against HDU/HLU nested targets!
a6580e9 remove unused variables in test file
f4a26c5 update copyright
16a6266 fix dcubed nested target
ca5cd7a mark luac item as advanced
f131cbe actually use the jttk root dir specified
501dbb2 improve dcubed include dirs
ae8764f improve splitting osg plugins into debug and release

git-subtree-dir: cmake
git-subtree-split: cac13f1c3225555cec9ae06a1ba47baa8c90442a
  • Loading branch information
rpavlik committed Dec 12, 2012
1 parent e65c4ef commit dd2c7e9
Show file tree
Hide file tree
Showing 62 changed files with 3,117 additions and 361 deletions.
2 changes: 1 addition & 1 deletion AboutTheseModules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# need to call:
# include(BoostTestTargets)
#
# For more information, see the documentation for individual modules, the
# For more information, see the documentation for individual modules, the
# cmake-modules github page, and/or the upstream CMake documentation at
# http://www.cmake.org/cmake/help/cmake-2-8-docs.html
#
Expand Down
16 changes: 14 additions & 2 deletions BundleOSGPlugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function(_osgbundle_split_debug_versions releasevar debugvar)
set(debug)
foreach(fn ${ARGN})
get_filename_component(name "${fn}" NAME_WE)
if(${name} MATCHES "d$")
if("${name}" MATCHES "d$")
list(APPEND debug "${fn}")
else()
list(APPEND release "${fn}")
Expand Down Expand Up @@ -75,9 +75,21 @@ endif()
function(install_osg_plugins var)
set(INSTALLEDPLUGINS)
foreach(plugin ${OSGDB_PLUGINS_RELEASE} ${OSGWRAPPER_PLUGINS_RELEASE})
install(FILES "${plugin}" DESTINATION "${OSG_PATH_TO_PLUGINS}")
install(FILES "${plugin}"
DESTINATION "${OSG_PATH_TO_PLUGINS}"
CONFIGURATIONS Release RelWithDebInfo MinSizeRel)
get_filename_component(name "${plugin}" NAME)
list(APPEND INSTALLEDPLUGINS "${OSG_PATH_TO_PLUGINS}/${name}")
endforeach()
foreach(plugin ${OSGDB_PLUGINS_DEBUG} ${OSGWRAPPER_PLUGINS_DEBUG})
install(FILES
"${plugin}"
DESTINATION
"${OSG_PATH_TO_PLUGINS}"
CONFIGURATIONS
Debug)
#get_filename_component(name "${plugin}" NAME)
#list(APPEND INSTALLEDPLUGINS "${OSG_PATH_TO_PLUGINS}/${name}")
endforeach()
set(${var} ${INSTALLEDPLUGINS} PARENT_SCOPE)
endfunction()
2 changes: 0 additions & 2 deletions CheckMacHIDAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ int main(int argc, char* argv[]) {
#if defined(__APPLE__)
io_object_t _ioObject;
IOHIDDeviceInterface122 **_interface;
bool _gotdata;
int _gotsize;
unsigned char _buffer[512];
IOReturn result = (*_interface)->setInterruptReportHandlerCallback(_interface,
_buffer, 512,
Expand Down
2 changes: 1 addition & 1 deletion CreateDashboardScripts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function(create_dashboard_scripts)
endif()

set(_msg)

if(NOT DASHBOARDSCRIPT_BUILD_CONFIGURATION)
set(DASHBOARDSCRIPT_BUILD_CONFIGURATION "RelWithDebInfo")
endif()
Expand Down
2 changes: 1 addition & 1 deletion CreateLaunchers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ macro(_launcher_system_settings)
set(LAUNCHERS_GOT_GDB YES)
if(GDB_HAS_RETURN_CHILD_RESULT)
set(LAUNCHERS_GDB_ARG --return-child-result)
endif()
endif()
else()
set(LAUNCHERS_GOT_GDB)
endif()
Expand Down
23 changes: 23 additions & 0 deletions DoxygenTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ function(add_doxygen _doxyfile)
else()
add_custom_target(${DOC_TARGET} ALL)
endif()

endif()

if(NOT IS_ABSOLUTE "${OUTPUT_DIRECTORY}")
Expand All @@ -228,6 +229,28 @@ function(add_doxygen _doxyfile)
"${OUTPUT_DIRECTORY}/html"
"${OUTPUT_DIRECTORY}/latex")

if(NOT TARGET ${DOC_TARGET}_open)
# Create a target to open the generated HTML file.
if(WIN32)
set(DOXYGEN_LAUNCHER_COMMAND start "Documentation")
elseif(NOT APPLE)
set(DOXYGEN_LAUNCHER_COMMAND xdg-open)
endif()
if(DOXYGEN_LAUNCHER_COMMAND)
add_custom_target(${DOC_TARGET}_open
COMMAND ${DOXYGEN_LAUNCHER_COMMAND} "${OUTPUT_DIRECTORY}/html/index.html")
set_target_properties(${DOC_TARGET}_open
PROPERTIES
EXCLUDE_FROM_ALL
TRUE)
set_target_properties(${DOC_TARGET}_open
PROPERTIES
EXCLUDE_FROM_DEFAULT_BUILD
TRUE)
add_dependencies(${DOC_TARGET}_open ${DOC_TARGET})
endif()
endif()

get_filename_component(_doxyfileabs "${_doxyfile}" ABSOLUTE)
get_filename_component(INCLUDE_FILE "${_doxyfileabs}" NAME)
get_filename_component(INCLUDE_PATH "${_doxyfileabs}" PATH)
Expand Down
25 changes: 23 additions & 2 deletions EnableExtraCompilerWarnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,29 @@ macro(_enable_extra_compiler_warnings_flags)
if(COMPILER_WARNINGS_EXTREME)
set(_flags "${_flags} /Wall /wd4619 /wd4668 /wd4820 /wd4571 /wd4710")
endif()
elseif(CMAKE_COMPILER_IS_GNUCXX)
set(_flags "-W -Wall")
else()
include(CheckCXXCompilerFlag)
set(_flags)

check_cxx_compiler_flag(-W SUPPORTS_W_FLAG)
if(SUPPORTS_W_FLAG)
set(_flags "${_flags} -W")
endif()

check_cxx_compiler_flag(-Wall SUPPORTS_WALL_FLAG)
if(SUPPORTS_WALL_FLAG)
set(_flags "${_flags} -Wall")
endif()

check_cxx_compiler_flag(-Wextra SUPPORTS_WEXTRA_FLAG)
if(SUPPORTS_WEXTRA_FLAG)
set(_flags "${_flags} -Wextra")
endif()

check_cxx_compiler_flag(-Weffc++ SUPPORTS_WEFFCXX_FLAG)
if(SUPPORTS_WEFFCXX_FLAG)
set(_flags "${_flags} -Weffc++")
endif()
endif()
endmacro()

Expand Down
4 changes: 3 additions & 1 deletion FileCopyTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ function(add_file_copy_target _target _dest)
get_filename_component(fullpath "${fn}" ABSOLUTE)
get_filename_component(fn "${fn}" NAME)
else()
get_filename_component(fullpath "${CMAKE_CURRENT_SOURCE_DIR}/${fn}" ABSOLUTE)
get_filename_component(fullpath
"${CMAKE_CURRENT_SOURCE_DIR}/${fn}"
ABSOLUTE)
endif()

# Clean up output file name
Expand Down
202 changes: 202 additions & 0 deletions FindAdrienne.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
# - try to find Adrienne Electronics Corporation timecode card library
#
# SDK available from the manufacturer: http://www.adrielec.com/
#
# Cache Variables: (probably not for direct use in your scripts)
# ADRIENNE_INCLUDE_DIR
# ADRIENNE_LIBRARY
# ADRIENNE_RUNTIME_LIBRARY
# ADRIENNE_INCLUDE_FILE
#
# Variables you might use in your CMakeLists.txt:
# ADRIENNE_FOUND
# ADRIENNE_INCLUDE_DIRS
# ADRIENNE_LIBRARIES
# ADRIENNE_RUNTIME_LIBRARIES - the AEC_NTTC.dll file
# ADRIENNE_RUNTIME_LIBRARY_DIRS
#
# ADRIENNE_INCLUDE_FILENAME - this is probably AEC_NTTC.h, but it might also
# be AECINTTC.H.
#
# ADRIENNE_INCLUDE_HAS_EXTERN_C - Some (most) versions of the header already
# wrap their definitions in extern "C" { }, but some do not.
#
# ADRIENNE_DEFINITIONS - defines a quoted ADRIENNE_INCLUDE_FILENAME as above,
# so you can write a line like #include ADRIENNE_INCLUDE_FILENAME
# Also defines ADRIENNE_BEFORE_INCLUDE and ADRIENNE_AFTER_INCLUDE to handle
# adding extern "C" { and } if the header file doesn't do so itself.
#
# Variables that might be set by the user in the gui/command line to help
# find the library:
# ADRIENNE_ROOT_DIR - root of an Adrienne CD, disk, or extracted/copied contents
# thereof.
#
# Requires these CMake modules:
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
#
# Original Author:
# 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2012.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

# Apparently Windows only.
if(WIN32 OR CYGWIN)
set(ADRIENNE_ROOT_DIR
"${ADRIENNE_ROOT_DIR}"
CACHE
PATH
"Directory to search for Adrienne Electronics Timecode data - root of a software distribution or extracted download from http://www.adrielec.com/")

set(ADRIENNE_DEFINITIONS)

set(ADRIENNE_INCLUDE_SEARCH
# from AecPCIeTC_8-12a: contains AEC_NTTC.h with extern "C" and three extra functions:
# AEC_PCTC_OPEN_ALL, AEC_PCTC_CLOSE_ALL, AEC_PCTC_INITIALIZE_EVENT
"SDK_SourceCode"

# from AecPci6_02_CD - called AECINTTC.H but otherwise essentially identical to earlier versions
"TestPrograms_WithDLL/DLL_API_INFO"
# A zipped development project contains essentially the same, named AEC_NTTC.h so we'll add this in case it's unzipped.
"TestPrograms_WithDLL/ZippedDevelopmentProjects/AecMfc32_Rel504"

# from pc-ltc - called AECINTTC.H and lacks extern "C"
"NT-CODE/C40-APP1"
)
set(ADRIENNE_HEADER_NAMES
AEC_NTTC.H
AEC_NTTC.h
Aec_nttc.h
AECINTTC.H)

set(ADRIENNE_LIB_SEARCH)
set(ADRIENNE_DLL_SEARCH)

if(CMAKE_SIZEOF_VOID_P MATCHES "8")
# 64 bit code - apparently initially packaged only in the
# PCIe version of their software
list(APPEND ADRIENNE_LIB_SEARCH
# from AecPCIeTC_8-12a
"64BitOS_files/DLL Versions")

list(APPEND ADRIENNE_DLL_SEARCH
# from AecPCIeTC_8-12a
"64BitOS_files/DLL Versions")
else()
# 32-bit code, much more prevalent.
list(APPEND ADRIENNE_LIB_SEARCH
# from AecPCIeTC_8-12a
"32BitOS_files/DLLversions"

# from AecPci6_02_CD
"TestPrograms_WithDLL/DLL_API_INFO"

# from pc-ltc
"NT-CODE/DLL"
)

list(APPEND ADRIENNE_DLL_SEARCH
# from AecPCIeTC_8-12a
"32BitOS_files/DLLversions"

# from AecPci6_02_CD
"TestPrograms_WithDLL"

# from pc-ltc
"NT-CODE/DLL")
endif()

find_library(ADRIENNE_LIBRARY
NAMES
AEC_NTTC
PATHS
"${ADRIENNE_ROOT_DIR}"
PATH_SUFFIXES
${ADRIENNE_LIB_SEARCH})

find_path(ADRIENNE_INCLUDE_DIR
NAMES
${ADRIENNE_HEADER_NAMES}
PATHS
"${ADRIENNE_ROOT_DIR}"
PATH_SUFFIXES
${ADRIENNE_INCLUDE_SEARCH})

if(ADRIENNE_INCLUDE_DIR)
find_file(ADRIENNE_INCLUDE_FILE
NAMES
${ADRIENNE_HEADER_NAMES}
HINTS
${ADRIENNE_INCLUDE_DIR})

# Get include filename
get_filename_component(ADRIENNE_INCLUDE_FILENAME
"${ADRIENNE_INCLUDE_FILE}"
NAME)
list(APPEND ADRIENNE_DEFINITIONS -DADRIENNE_INCLUDE_FILENAME="ADRIENNE_INCLUDE_FILENAME")

# Find out if it has extern "C" in it.
file(STRINGS "${ADRIENNE_INCLUDE_FILE}" strings)
set(ADRIENNE_INCLUDE_HAS_EXTERN_C OFF)
foreach(_line ${strings})
if("${_line}" STREQUAL "extern \"C\"")
set(ADRIENNE_INCLUDE_HAS_EXTERN_C ON)
break()
endif()
endforeach()

if(ADRIENNE_INCLUDE_HAS_EXTERN_C)
list(APPEND ADRIENNE_DEFINITIONS -DADRIENNE_BEFORE_INCLUDE -DADRIENNE_AFTER_INCLUDE)
else()
list(APPEND ADRIENNE_DEFINITIONS "-DADRIENNE_BEFORE_INCLUDE=extern \"C\" {" "-DADRIENNE_AFTER_INCLUDE=}")
endif()
endif()

get_filename_component(_adrienne_libdir "${ADRIENNE_LIBRARY}" PATH)
find_file(ADRIENNE_RUNTIME_LIBRARY
NAMES
AEC_NTTC.dll
HINTS
"${_adrienne_libdir}"
"${_adrienne_libdir}/.."
PATHS
"${ADRIENNE_ROOT_DIR}"
PATH_SUFFIXES
${ADRIENNE_DLL_SEARCH})


set(ADRIENNE_RUNTIME_LIBRARIES "${ADRIENNE_RUNTIME_LIBRARY}")
get_filename_component(ADRIENNE_RUNTIME_LIBRARY_DIRS
"${ADRIENNE_RUNTIME_LIBRARY}"
PATH)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Adrienne
DEFAULT_MSG
ADRIENNE_LIBRARY
ADRIENNE_RUNTIME_LIBRARY
ADRIENNE_INCLUDE_DIR
ADRIENNE_INCLUDE_FILENAME)

if(ADRIENNE_FOUND)
set(ADRIENNE_LIBRARIES "${ADRIENNE_LIBRARY}")
set(ADRIENNE_INCLUDE_DIRS "${ADRIENNE_INCLUDE_DIR}")
mark_as_advanced(ADRIENNE_ROOT_DIR)
endif()

mark_as_advanced(
ADRIENNE_LIBRARY
ADRIENNE_RUNTIME_LIBRARY
ADRIENNE_INCLUDE_DIR
ADRIENNE_INCLUDE_FILE)
else()
set(ADRIENNE_FOUND OFF)
set(ADRIENNE_SDK_IS_WINDOWS_ONLY NOTFOUND)
find_package_handle_standard_args(Adrienne
DEFAULT_MSG
ADRIENNE_SDK_IS_WINDOWS_ONLY)
endif()

0 comments on commit dd2c7e9

Please sign in to comment.