2016-09-27 22:01:08 +03:00
|
|
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
|
|
|
|
2013-10-15 19:17:36 +04:00
|
|
|
#.rst:
|
|
|
|
# FindCoin3D
|
|
|
|
# ----------
|
|
|
|
#
|
|
|
|
# Find Coin3D (Open Inventor)
|
|
|
|
#
|
|
|
|
# Coin3D is an implementation of the Open Inventor API. It provides
|
2015-02-11 19:03:02 +03:00
|
|
|
# data structures and algorithms for 3D visualization.
|
2008-09-17 22:29:18 +04:00
|
|
|
#
|
|
|
|
# This module defines the following variables
|
|
|
|
#
|
2013-10-15 19:17:36 +04:00
|
|
|
# ::
|
|
|
|
#
|
|
|
|
# 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
|
2009-09-28 19:45:50 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if (WIN32)
|
|
|
|
if (CYGWIN)
|
2008-09-17 22:29:18 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
find_path(COIN3D_INCLUDE_DIRS Inventor/So.h)
|
|
|
|
find_library(COIN3D_LIBRARIES Coin)
|
2008-09-17 22:29:18 +04:00
|
|
|
|
2012-08-13 21:50:14 +04:00
|
|
|
else ()
|
2008-09-17 22:29:18 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
find_path(COIN3D_INCLUDE_DIRS Inventor/So.h
|
2008-09-17 22:29:18 +04:00
|
|
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/include"
|
|
|
|
)
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
find_library(COIN3D_LIBRARY_DEBUG coin2d
|
2008-09-17 22:29:18 +04:00
|
|
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
|
|
|
|
)
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
find_library(COIN3D_LIBRARY_RELEASE coin2
|
2008-09-17 22:29:18 +04:00
|
|
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
|
|
|
|
)
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
|
|
|
set(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
|
2008-09-17 22:29:18 +04:00
|
|
|
debug ${COIN3D_LIBRARY_DEBUG})
|
2012-08-13 21:50:14 +04:00
|
|
|
else ()
|
2012-08-13 21:47:32 +04:00
|
|
|
if (COIN3D_LIBRARY_DEBUG)
|
|
|
|
set (COIN3D_LIBRARIES ${COIN3D_LIBRARY_DEBUG})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif ()
|
2012-08-13 21:47:32 +04:00
|
|
|
if (COIN3D_LIBRARY_RELEASE)
|
|
|
|
set (COIN3D_LIBRARIES ${COIN3D_LIBRARY_RELEASE})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif ()
|
|
|
|
endif ()
|
2012-08-13 21:47:32 +04:00
|
|
|
|
2012-08-13 21:50:14 +04:00
|
|
|
endif ()
|
2012-08-13 21:47:32 +04:00
|
|
|
|
2012-08-13 21:50:14 +04:00
|
|
|
else ()
|
2012-08-13 21:47:32 +04:00
|
|
|
if(APPLE)
|
|
|
|
find_path(COIN3D_INCLUDE_DIRS Inventor/So.h
|
2012-08-13 21:42:58 +04:00
|
|
|
/Library/Frameworks/Inventor.framework/Headers
|
2008-09-17 22:29:18 +04:00
|
|
|
)
|
2012-08-13 21:47:32 +04:00
|
|
|
find_library(COIN3D_LIBRARIES Coin
|
2008-09-17 22:29:18 +04:00
|
|
|
/Library/Frameworks/Inventor.framework/Libraries
|
2012-08-13 21:42:58 +04:00
|
|
|
)
|
2012-08-13 21:47:32 +04:00
|
|
|
set(COIN3D_LIBRARIES "-framework Coin3d" CACHE STRING "Coin3D library for OSX")
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2008-09-17 22:29:18 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
find_path(COIN3D_INCLUDE_DIRS Inventor/So.h)
|
|
|
|
find_library(COIN3D_LIBRARIES Coin)
|
2008-09-17 22:29:18 +04:00
|
|
|
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2008-09-17 22:29:18 +04:00
|
|
|
|
2012-08-13 21:50:14 +04:00
|
|
|
endif ()
|
2008-09-17 22:29:18 +04:00
|
|
|
|
2012-08-13 21:42:58 +04:00
|
|
|
# handle the QUIETLY and REQUIRED arguments and set COIN3D_FOUND to TRUE if
|
2008-09-17 22:29:18 +04:00
|
|
|
# all listed variables are TRUE
|
2012-08-13 21:47:32 +04:00
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
2008-09-17 22:29:18 +04:00
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Coin3D DEFAULT_MSG COIN3D_LIBRARIES COIN3D_INCLUDE_DIRS)
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
mark_as_advanced(COIN3D_INCLUDE_DIRS COIN3D_LIBRARIES )
|
2008-09-17 22:29:18 +04:00
|
|
|
|
|
|
|
|