~ubuntu-branches/debian/experimental/openscenegraph/experimental

« back to all changes in this revision

Viewing changes to OpenSceneGraph/CMakeModules/FindFBX.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Luaces
  • Date: 2010-05-03 21:42:01 UTC
  • mfrom: (1.1.9 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20100503214201-iy060qxb94vsfv87
Tags: 2.8.3-3
* Added README.source. Thanks Manuel Montecelo.
* Removed FindGDAL.cmake file supplied by upstream since it does not
  detect current libgdal1-1.6.0. The script provided by CMake works
  fine.
* Removed openthreads-doc since OpenThreads documentation is shared with
  OpenSceneGraph's, hence this package was empty.
* Now ccache handling is being done automatically by CMake.
* Drop conflict dependencies with previous versions to let them coexist
  with current ones (Closes: #580079 #580081).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Locate FBX
 
2
# This module defines:
 
3
# FBX_INCLUDE_DIR, where to find the headers
 
4
#
 
5
# FBX_LIBRARY, FBX_LIBRARY_DEBUG
 
6
# FBX_FOUND
 
7
#
 
8
# $FBX_DIR is an environment variable that would
 
9
# correspond to the ./configure --prefix=$FBX_DIR
 
10
 
 
11
IF(WIN32)
 
12
SET(FBX_ROOT "$ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2010.2" CACHE PATH "Location of FBX SDK directory")
 
13
ELSE(WIN32)
 
14
SET(FBX_ROOT $ENV{FBX_DIR} CACHE PATH "Location of FBX SDK directory")
 
15
ENDIF(WIN32)
 
16
 
 
17
IF(APPLE)
 
18
    SET(FBX_LIBNAME "libfbxsdk_gcc4_ub")
 
19
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
 
20
    SET(FBX_LIBNAME "libfbxsdk_gcc4")#TODO: libs are provided for GCC 3.4 & 4.0 in both 32 and 64 bit versions, but I don't know how to confgure that here.
 
21
ELSEIF(MSVC71)
 
22
    SET(FBX_LIBNAME "fbxsdk_md2003")
 
23
ELSEIF(MSVC80)
 
24
    SET(FBX_LIBNAME "fbxsdk_md2005")
 
25
ELSEIF(MSVC90 OR MSVC_VER>1500)
 
26
    SET(FBX_LIBNAME "fbxsdk_md2008")
 
27
ENDIF(APPLE)
 
28
 
 
29
IF(CMAKE_CL_64)
 
30
    SET(FBX_LIBNAME ${FBX_LIBNAME}_amd64)
 
31
ENDIF(CMAKE_CL_64)
 
32
 
 
33
IF(APPLE)
 
34
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME})
 
35
ELSE(APPLE)
 
36
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)
 
37
ENDIF(APPLE)
 
38
 
 
39
FIND_PATH(FBX_INCLUDE_DIR fbxsdk.h
 
40
    ${FBX_ROOT}/include
 
41
)
 
42
 
 
43
FIND_LIBRARY(FBX_LIBRARY ${FBX_LIBNAME} ${FBX_ROOT}/lib)
 
44
 
 
45
FIND_LIBRARY(FBX_LIBRARY_DEBUG ${FBX_LIBNAME_DEBUG} ${FBX_ROOT}/lib)
 
46
 
 
47
IF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)
 
48
    SET(FBX_FOUND "YES")
 
49
ELSE(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)
 
50
    SET(FBX_FOUND "NO")
 
51
ENDIF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)