2009-11-19 19:44:44 +08:00
|
|
|
# Locate FBX
|
|
|
|
# This module defines:
|
|
|
|
# FBX_INCLUDE_DIR, where to find the headers
|
|
|
|
#
|
|
|
|
# FBX_LIBRARY, FBX_LIBRARY_DEBUG
|
|
|
|
# FBX_FOUND
|
|
|
|
#
|
|
|
|
# $FBX_DIR is an environment variable that would
|
|
|
|
# correspond to the ./configure --prefix=$FBX_DIR
|
|
|
|
|
|
|
|
IF(APPLE)
|
2010-06-15 17:14:20 +08:00
|
|
|
SET(FBX_LIBNAME "fbxsdk_gcc4_ub")
|
2009-11-19 19:44:44 +08:00
|
|
|
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
|
2010-06-15 17:14:20 +08:00
|
|
|
SET(FBX_LIBNAME "fbxsdk_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.
|
2009-11-19 19:44:44 +08:00
|
|
|
ELSEIF(MSVC71)
|
|
|
|
SET(FBX_LIBNAME "fbxsdk_md2003")
|
|
|
|
ELSEIF(MSVC80)
|
|
|
|
SET(FBX_LIBNAME "fbxsdk_md2005")
|
|
|
|
ELSEIF(MSVC90 OR MSVC_VER>1500)
|
|
|
|
SET(FBX_LIBNAME "fbxsdk_md2008")
|
2010-06-15 17:14:20 +08:00
|
|
|
ENDIF()
|
2009-11-19 19:44:44 +08:00
|
|
|
|
|
|
|
IF(CMAKE_CL_64)
|
|
|
|
SET(FBX_LIBNAME ${FBX_LIBNAME}_amd64)
|
2010-06-15 17:14:20 +08:00
|
|
|
ENDIF()
|
2009-11-19 19:44:44 +08:00
|
|
|
|
|
|
|
IF(APPLE)
|
2010-06-15 17:14:20 +08:00
|
|
|
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME})
|
|
|
|
ELSE()
|
|
|
|
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
# SET final path
|
|
|
|
SET( FBX_SEARCH_PATHS
|
|
|
|
$ENV{FBX_DIR}
|
|
|
|
$ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2011.2
|
|
|
|
/Applications/Autodesk/FBXSDK20112
|
2009-11-19 19:44:44 +08:00
|
|
|
)
|
|
|
|
|
2010-06-15 17:14:20 +08:00
|
|
|
# search for headers & debug/release libraries
|
|
|
|
FIND_PATH(FBX_INCLUDE_DIR fbxsdk.h
|
|
|
|
PATHS ${FBX_SEARCH_PATHS}
|
|
|
|
PATH_SUFFIXES include )
|
|
|
|
FIND_LIBRARY( FBX_LIBRARY ${FBX_LIBNAME}
|
|
|
|
PATHS ${FBX_SEARCH_PATHS}
|
|
|
|
PATH_SUFFIXES lib)
|
|
|
|
FIND_LIBRARY( FBX_LIBRARY_DEBUG ${FBX_LIBNAME_DEBUG}
|
|
|
|
PATHS ${FBX_SEARCH_PATHS}
|
|
|
|
PATH_SUFFIXES lib)
|
2009-11-19 19:44:44 +08:00
|
|
|
|
|
|
|
IF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)
|
|
|
|
SET(FBX_FOUND "YES")
|
2010-06-15 17:14:20 +08:00
|
|
|
ELSE()
|
2009-11-19 19:44:44 +08:00
|
|
|
SET(FBX_FOUND "NO")
|
2010-06-15 17:14:20 +08:00
|
|
|
ENDIF()
|