From Vladimir Chebaev, "Dynamic linking of fbx plugin and fbx SDK"

This commit is contained in:
Robert Osfield 2016-12-21 15:13:49 +00:00
parent 5b52f8ca67
commit b950c428a6
2 changed files with 11 additions and 1 deletions

View File

@ -43,7 +43,12 @@ IF(APPLE)
ELSEIF(CMAKE_COMPILER_IS_GNUCXX) ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
SET(FBX_LIBNAME "fbxsdk") SET(FBX_LIBNAME "fbxsdk")
ELSE() ELSE()
SET(FBX_LIBNAME "libfbxsdk-md") OPTION(FBX_SHARED OFF)
IF(FBX_SHARED)
SET(FBX_LIBNAME "libfbxsdk")
ELSE()
SET(FBX_LIBNAME "libfbxsdk-md")
ENDIF()
ENDIF() ENDIF()
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d) SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)

View File

@ -28,6 +28,11 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
ENDIF() ENDIF()
IF(WIN32) IF(WIN32)
OPTION(FBX_SHARED OFF)
IF(FBX_SHARED)
ADD_DEFINITIONS(-DFBXSDK_SHARED)
ENDIF(FBX_SHARED)
SET(TARGET_EXTERNAL_LIBRARIES wininet) SET(TARGET_EXTERNAL_LIBRARIES wininet)
ENDIF(WIN32) ENDIF(WIN32)