From Michael Platings, "Hi Bob, thanks for the CMake fixes. I'm not sure what the purpose of the capitalisation changes was so I've reverted that (a) to make diff-ing easier and (b) because all-caps is consistent with all the other OSG CMake files. Aside from that the changes seem fine.

I don't understand the changes to ReaderWriterFBX.cpp - (i) strings.h isn't a standard header, (ii) the ISO-conformant form is _strnicmp (with the underscore). Does the existing code not compile for you? If not we'll have to do some #ifdef nastiness."
This commit is contained in:
Robert Osfield 2010-06-15 09:14:20 +00:00
parent 0c7a4fdedc
commit d9bd6c977e
2 changed files with 28 additions and 22 deletions

View File

@ -8,44 +8,50 @@
# $FBX_DIR is an environment variable that would # $FBX_DIR is an environment variable that would
# correspond to the ./configure --prefix=$FBX_DIR # correspond to the ./configure --prefix=$FBX_DIR
IF(WIN32)
SET(FBX_ROOT "$ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2011.2" CACHE PATH "Location of FBX SDK directory")
ELSE(WIN32)
SET(FBX_ROOT $ENV{FBX_DIR} CACHE PATH "Location of FBX SDK directory")
ENDIF(WIN32)
IF(APPLE) IF(APPLE)
SET(FBX_LIBNAME "libfbxsdk_gcc4_ub") SET(FBX_LIBNAME "fbxsdk_gcc4_ub")
ELSEIF(CMAKE_COMPILER_IS_GNUCXX) ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
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. 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.
ELSEIF(MSVC71) ELSEIF(MSVC71)
SET(FBX_LIBNAME "fbxsdk_md2003") SET(FBX_LIBNAME "fbxsdk_md2003")
ELSEIF(MSVC80) ELSEIF(MSVC80)
SET(FBX_LIBNAME "fbxsdk_md2005") SET(FBX_LIBNAME "fbxsdk_md2005")
ELSEIF(MSVC90 OR MSVC_VER>1500) ELSEIF(MSVC90 OR MSVC_VER>1500)
SET(FBX_LIBNAME "fbxsdk_md2008") SET(FBX_LIBNAME "fbxsdk_md2008")
ENDIF(APPLE) ENDIF()
IF(CMAKE_CL_64) IF(CMAKE_CL_64)
SET(FBX_LIBNAME ${FBX_LIBNAME}_amd64) SET(FBX_LIBNAME ${FBX_LIBNAME}_amd64)
ENDIF(CMAKE_CL_64) ENDIF()
IF(APPLE) IF(APPLE)
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}) SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME})
ELSE(APPLE) ELSE()
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d) SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)
ENDIF(APPLE) ENDIF()
FIND_PATH(FBX_INCLUDE_DIR fbxsdk.h # SET final path
${FBX_ROOT}/include SET( FBX_SEARCH_PATHS
$ENV{FBX_DIR}
$ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2011.2
/Applications/Autodesk/FBXSDK20112
) )
FIND_LIBRARY(FBX_LIBRARY ${FBX_LIBNAME} ${FBX_ROOT}/lib) # search for headers & debug/release libraries
FIND_PATH(FBX_INCLUDE_DIR fbxsdk.h
FIND_LIBRARY(FBX_LIBRARY_DEBUG ${FBX_LIBNAME_DEBUG} ${FBX_ROOT}/lib) 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)
IF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR) IF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)
SET(FBX_FOUND "YES") SET(FBX_FOUND "YES")
ELSE(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR) ELSE()
SET(FBX_FOUND "NO") SET(FBX_FOUND "NO")
ENDIF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR) ENDIF()

View File

@ -1,4 +1,4 @@
INCLUDE_DIRECTORIES(${FBX_ROOT}/include) INCLUDE_DIRECTORIES(${FBX_INCLUDE_DIR})
SET(TARGET_SRC SET(TARGET_SRC
fbxRAnimation.cpp fbxRAnimation.cpp