diff options
author | Matthew Leotta <matt.leotta@gmail.com> | 2008-09-17 18:29:18 (GMT) |
---|---|---|
committer | Matthew Leotta <matt.leotta@gmail.com> | 2008-09-17 18:29:18 (GMT) |
commit | 20141bea1aa13e84a238fdaa6f90c5c250f7461c (patch) | |
tree | 16538103e30ba8dbafe9be592b67e025f609c2c7 /Modules/FindCoin3D.cmake | |
parent | 12396bebacd36d5725e89c72844912c2eea218ed (diff) | |
download | CMake-20141bea1aa13e84a238fdaa6f90c5c250f7461c.zip CMake-20141bea1aa13e84a238fdaa6f90c5c250f7461c.tar.gz CMake-20141bea1aa13e84a238fdaa6f90c5c250f7461c.tar.bz2 |
ENH: added a module to find Coin3D
Diffstat (limited to 'Modules/FindCoin3D.cmake')
-rw-r--r-- | Modules/FindCoin3D.cmake | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/Modules/FindCoin3D.cmake b/Modules/FindCoin3D.cmake new file mode 100644 index 0000000..e42d3e4 --- /dev/null +++ b/Modules/FindCoin3D.cmake @@ -0,0 +1,72 @@ +# - Find Coin3D (Open Inventor) +# Coin3D is an implementation of the Open Inventor API. +# It provides data structures and algorithms for 3D visualization +# http://www.coin3d.org/ +# +# This module defines the following variables +# COIN3D_FOUND - system has Coin3D - Open Inventor +# COIN3D_INCLUDE_DIRS - where the Inventor include directory can be found +# COIN3D_LIBRARIES - Link to this to use Coin3D +# + + +IF (WIN32) + IF (CYGWIN) + + FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h) + FIND_LIBRARY(COIN3D_LIBRARIES Coin) + + ELSE (CYGWIN) + + FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/include" + ) + + FIND_LIBRARY(COIN3D_LIBRARY_DEBUG coin2d + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib" + ) + + FIND_LIBRARY(COIN3D_LIBRARY_RELEASE coin2 + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib" + ) + + IF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE) + SET(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE} + debug ${COIN3D_LIBRARY_DEBUG}) + ELSE (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE) + IF (COIN3D_LIBRARY_DEBUG) + SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_DEBUG}) + ENDIF (COIN3D_LIBRARY_DEBUG) + IF (COIN3D_LIBRARY_RELEASE) + SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_RELEASE}) + ENDIF (COIN3D_LIBRARY_RELEASE) + ENDIF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE) + + ENDIF (CYGWIN) + +ELSE (WIN32) + IF(APPLE) + FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h + /Library/Frameworks/Inventor.framework/Headers + ) + FIND_LIBRARY(COIN3D_LIBRARIES Coin + /Library/Frameworks/Inventor.framework/Libraries + ) + SET(COIN3D_LIBRARIES "-framework Coin3d" CACHE STRING "Coin3D library for OSX") + ELSE(APPLE) + + FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h) + FIND_LIBRARY(COIN3D_LIBRARIES Coin) + + ENDIF(APPLE) + +ENDIF (WIN32) + +# handle the QUIETLY and REQUIRED arguments and set COIN3D_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Coin3D DEFAULT_MSG COIN3D_LIBRARIES COIN3D_INCLUDE_DIRS) + +MARK_AS_ADVANCED(COIN3D_INCLUDE_DIRS COIN3D_LIBRARIES ) + + |