8647ab0 update help 8c434a7 have luatargets.cmake actually try building (parsing) the lua scripts abbbe59 update rendered help 4226520 remove unnecessary whitespace fce2353 fix some leftover juggler 2.2 bits in the juggler 3.0 finder 072dda4 fix libusb finder on windows 3bf666c be sure to find all needed boost libraries for juggler 3.0 3e0d529 handle windows names for juggler 3.0 libraries 6cb00f4 handle config types in dashboard scripts 449fe46 Improve vrpn/quatlib finders to find the default locations on Windows 450a051 improve launcher templates e8e1aee Fix the gdb finder 099d79f Fix finding OSG in some cases 2d5319f Update help files 9567cf8 Improve glove5dt finder 73d4de3 Find git.cmd on windows cef7140 Silly bug in simpler juggler finder 5706470 Improve juggler finder 2f6f3ef Fix gdb finder ae37c1a Clean up juggler finding 9416490 Improve gdb finder d30789e Merge changes from finding juggler 2.2 into 3.0 00d407e Don't force juggler into debug mode 6668496 No more nspr on windows 737b8e2 Fix boost finding in VPR 2.2 c530fa3 Don't need a separate cppdom module for juggler 30 c10441c Merge branch 'master' of https://github.com/bnewendorp/cmake-modules into bnewendorp-master 0485c6c Update rendered help c4c1ea8 Improve formatting of copyright notice when rendered to html 58ba978 Add reference to help in the readme 2052efb Generate text too, and rename e3a0f3f Add help files and aboutthesemodules dummy module dab6182 GetGitRevisionDescription: Fix HEAD hash finding in case of a detached HEAD checkout 278658c Fix a wee bug in the gdb finder f0ac2bc Launchers now check version of GDB before throwing options at it. Fixes --debugger option on Macs. 6e66227 find gdb 1cbceb8 rename luatargets to filecopytargets, and forward calls from the old name 0bdd129 add the upcoming boost 1.46 86cfbb4 make boost test targets succeed on macs with homebrew c290bbe Merge boost fix from pre-2.8.4 cc24a0d Improve dcubed finder and use nested targets 69b25b4 Clean up parasolid nested target f467bb0 Don't force juggler into debug mode 250c5f0 Find boost 1.45 b15faa5 Add HIDAPI and libusb1 7236f4f Add OptionRequires module 7032b46 Improvements to cutil 9f0e966 Tweak to boost test c60a1ea Added Juggler 3.0 files git-subtree-dir: cmake git-subtree-split: 8647ab061587c8c0fd7343b77b3e3bd367da0180
192 lines
4.7 KiB
CMake
192 lines
4.7 KiB
CMake
# - try to find DCUBED library
|
|
#
|
|
# DCUBED_LIBRARY_DIR, library search path
|
|
# DCUBED_INCLUDE_DIR, include search path
|
|
# DCUBED_{component}_LIBRARY, the library to link against
|
|
# DCUBED_ENVIRONMENT
|
|
# DCUBED_FOUND, If false, do not try to use this library.
|
|
#
|
|
# Plural versions refer to this library and its dependencies, and
|
|
# are recommended to be used instead, unless you have a good reason.
|
|
#
|
|
# Useful configuration variables you might want to add to your cache:
|
|
# DCUBED_ROOT_DIR - A directory prefix to search
|
|
# (a path that contains include/ as a subdirectory)
|
|
#
|
|
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu>
|
|
# http://academic.cleardefinition.com
|
|
# Iowa State University HCI Graduate Program/VRAC
|
|
#
|
|
# Copyright Iowa State University 2009-2010.
|
|
# 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)
|
|
|
|
if(NOT BITS)
|
|
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
|
set(BITS 64)
|
|
else()
|
|
set(BITS 32)
|
|
endif()
|
|
endif()
|
|
|
|
if(WIN32 AND MSVC)
|
|
include(CMakeDetermineVSServicePack)
|
|
determinevsservicepack(_sp)
|
|
if(MSVC71)
|
|
set(VC_VER vc71)
|
|
set(VC_VER_LONG vc71)
|
|
elseif(MSVC80)
|
|
set(VC_VER vc8)
|
|
set(VC_VER_LONG vc80)
|
|
# FIXME TODO provide more options here
|
|
set(D3BUILD nt8)
|
|
if("${_sp}" STREQUAL "vc80sp1")
|
|
set(_verstring nt8s1)
|
|
else()
|
|
set(_verstring nt8)
|
|
endif()
|
|
elseif(MSVC90)
|
|
set(VC_VER vc9)
|
|
set(VC_VER_LONG vc90)
|
|
set(_verstring nt9)
|
|
endif()
|
|
|
|
if(BITS EQUAL 32)
|
|
set(PLATFORM win32)
|
|
else()
|
|
set(PLATFORM win64)
|
|
endif()
|
|
endif()
|
|
|
|
if(NOT DCUBED_ROOT_DIR)
|
|
if(EXISTS "$ENV{DCUBED}" AND IS_DIRECTORY "$ENV{DCUBED}")
|
|
set(DCUBED_ROOT_DIR "$ENV{DCUBED}")
|
|
endif()
|
|
endif()
|
|
|
|
file(TO_CMAKE_PATH "${DCUBED_ROOT_DIR}" DCUBED_ROOT_DIR)
|
|
|
|
set(DCUBED_ROOT_DIR
|
|
"${DCUBED_ROOT_DIR}"
|
|
CACHE
|
|
PATH
|
|
"Root directory to search for DCubed")
|
|
|
|
# Do this by default
|
|
if(NOT DEFINED DCUBED_NESTED_TARGETS)
|
|
set(DCUBED_NESTED_TARGETS TRUE)
|
|
endif()
|
|
|
|
set(DCUBED_NESTED_TARGETS
|
|
"${DCUBED_NESTED_TARGETS}"
|
|
CACHE
|
|
BOOL
|
|
"Whether we should compile the wrappers as a part of the solution")
|
|
mark_as_advanced(DCUBED_NESTED_TARGETS)
|
|
|
|
###
|
|
# Configure DCubed
|
|
###
|
|
|
|
|
|
find_path(DCUBED_CORE_INCLUDE_DIR
|
|
d3ew_inc/modelgate.hxx
|
|
PATHS
|
|
"${DCUBED_ROOT_DIR}/inc")
|
|
|
|
foreach(lib aem cdmwp d3e_base d3e_cd dcm dcm3 g3)
|
|
find_library(DCUBED_${lib}_LIBRARY
|
|
${lib}
|
|
PATHS
|
|
"${DCUBED_ROOT_DIR}/lib/${_verstring}")
|
|
if(DCUBED_${lib}_LIBRARY)
|
|
list(APPEND DCUBED_LIBRARIES ${DCUBED_${lib}_LIBRARY})
|
|
list(APPEND DCUBED_CORE_LIBRARIES ${DCUBED_${lib}_LIBRARY})
|
|
endif()
|
|
mark_as_advanced(DCUBED_${lib}_LIBRARY)
|
|
endforeach()
|
|
|
|
find_path(DCUBED_WRAPPER_INCLUDE_DIR
|
|
d3ew_p/p_utils.hxx
|
|
PATHS
|
|
"${DCUBED_ROOT_DIR}/source/wrapper_source/")
|
|
|
|
foreach(lib d3ew_p d3ew_scene)
|
|
find_library(DCUBED_WRAPPER_${lib}_LIBRARY
|
|
${lib}_${D3BUILD}
|
|
PATHS
|
|
"${DCUBED_ROOT_DIR}/wrappers/cdmwp/${lib}")
|
|
mark_as_advanced(DCUBED_WRAPPER_${lib}_LIBRARY)
|
|
endforeach()
|
|
|
|
set(_nest_targets)
|
|
if(DCUBED_WRAPPER_INCLUDE_DIR)
|
|
foreach(lib d3ew_p d3ew_scene)
|
|
if(DCUBED_NESTED_TARGETS OR NOT DCUBED_WRAPPER_${lib}_LIBRARY)
|
|
if(PARASOLID_FOUND)
|
|
set(_nest_targets YES)
|
|
set(DCUBED_WRAPPER_${lib}_LIBRARY
|
|
"dcubed_wrapper_${lib}_nested_target"
|
|
CACHE
|
|
STRING
|
|
"We will build the DCubed wrapper ${lib} lib."
|
|
FORCE)
|
|
else()
|
|
set(DCUBED_WRAPPER_${lib}_LIBRARY
|
|
"NESTED_TARGET_REQUIRES_PARASOLID-NOTFOUND"
|
|
CACHE
|
|
STRING
|
|
"Can't build the DCubed wrapper ${lib} without first finding Parasolid."
|
|
FORCE)
|
|
endif()
|
|
endif()
|
|
endforeach()
|
|
endif()
|
|
|
|
foreach(lib d3ew_p d3ew_scene)
|
|
if(DCUBED_WRAPPER_${lib}_LIBRARY)
|
|
list(APPEND DCUBED_WRAPPER_LIBRARIES ${DCUBED_WRAPPER_${lib}_LIBRARY})
|
|
endif()
|
|
endforeach()
|
|
|
|
if(NOT DCUBED_ROOT_DIR)
|
|
get_filename_component(_path "${DCUBED_dcm_LIBRARY}" PATH)
|
|
get_filename_component(_path "${_path}/../.." ABSOLUTE)
|
|
set(DCUBED_ROOT_DIR
|
|
"${_path}"
|
|
CACHE
|
|
PATH
|
|
"Root directory to search for DCubed"
|
|
FORCE)
|
|
endif()
|
|
|
|
#file(TO_NATIVE_PATH "${DCUBED_ROOT_DIR}" _d3envdir)
|
|
set(DCUBED_ENVIRONMENT "DCUBED=${DCUBED_ROOT_DIR}")
|
|
|
|
# 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(DCubed
|
|
DEFAULT_MSG
|
|
DCUBED_ROOT_DIR
|
|
DCUBED_LIBRARIES
|
|
DCUBED_CORE_LIBRARIES
|
|
DCUBED_CORE_INCLUDE_DIR
|
|
DCUBED_WRAPPER_INCLUDE_DIR
|
|
DCUBED_WRAPPER_LIBRARIES)
|
|
|
|
if(DCUBED_FOUND)
|
|
if(_nest_targets)
|
|
get_filename_component(_moddir "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
add_subdirectory("${_moddir}/nested_targets/DCubed")
|
|
endif()
|
|
set(DCUBED_INCLUDE_DIRS
|
|
"${DCUBED_CORE_INCLUDE_DIR}"
|
|
"${DCUBED_CORE_INCLUDE_DIR}/if3"
|
|
"${DCUBED_WRAPPER_INCLUDE_DIR}")
|
|
mark_as_advanced(DCUBED_ROOT_DIR)
|
|
endif()
|
|
|
|
mark_as_advanced(DCUBED_CORE_INCLUDE_DIR DCUBED_WRAPPER_INCLUDE_DIR)
|