|
|
@ -18,6 +18,7 @@ FIND_PATH(MAXSDK_DIR
|
|
|
|
PATHS
|
|
|
|
PATHS
|
|
|
|
"$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk"
|
|
|
|
"$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk"
|
|
|
|
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk"
|
|
|
|
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk"
|
|
|
|
|
|
|
|
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2017 SDK/maxsdk"
|
|
|
|
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk"
|
|
|
|
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk"
|
|
|
|
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk"
|
|
|
|
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk"
|
|
|
|
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk"
|
|
|
|
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk"
|
|
|
@ -36,7 +37,7 @@ FIND_PATH(MAXSDK_CS_INCLUDE_DIR bipexp.h
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
IF(TARGET_X64)
|
|
|
|
IF(TARGET_X64)
|
|
|
|
SET(MAXSDK_LIBRARY_DIRS ${MAXSDK_DIR}/x64/lib)
|
|
|
|
SET(MAXSDK_LIBRARY_DIRS ${MAXSDK_DIR}/x64/lib ${MAXSDK_DIR}/lib/x64/Release)
|
|
|
|
ELSE()
|
|
|
|
ELSE()
|
|
|
|
SET(MAXSDK_LIBRARY_DIRS ${MAXSDK_DIR}/lib)
|
|
|
|
SET(MAXSDK_LIBRARY_DIRS ${MAXSDK_DIR}/lib)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
@ -73,8 +74,26 @@ if(MAXSDK_FOUND)
|
|
|
|
${MAXSDK_MAXUTIL_LIBRARY}
|
|
|
|
${MAXSDK_MAXUTIL_LIBRARY}
|
|
|
|
${MAXSDK_MAXSCRIPT_LIBRARY}
|
|
|
|
${MAXSDK_MAXSCRIPT_LIBRARY}
|
|
|
|
${MAXSDK_PARAMBLK2_LIBRARY}
|
|
|
|
${MAXSDK_PARAMBLK2_LIBRARY}
|
|
|
|
${MAXSDK_BMM_LIBRARY} )
|
|
|
|
${MAXSDK_BMM_LIBRARY})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# parse maxversion.h to determine SDK version
|
|
|
|
|
|
|
|
IF(EXISTS "${MAXSDK_DIR}/include/maxversion.h")
|
|
|
|
|
|
|
|
FILE(STRINGS "${MAXSDK_DIR}/include/maxversion.h" LINES REGEX "#define MAX_PRODUCT_YEAR_NUMBER ([0-9]+)")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
STRING(REGEX REPLACE ".+MAX_PRODUCT_YEAR_NUMBER ([0-9]+)" "\\1" MAXSDK_VERSION "${LINES}")
|
|
|
|
|
|
|
|
UNSET(LINES)
|
|
|
|
|
|
|
|
ELSE()
|
|
|
|
|
|
|
|
SET(MAXSDK_VERSION "Unknown")
|
|
|
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MESSAGE(STATUS "Found 3dsmax version ${MAXSDK_VERSION} in ${MAXSDK_DIR}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 3ds Max 2013 and later are always Unicode
|
|
|
|
|
|
|
|
IF(MAXSDK_VERSION VERSION_GREATER 2012)
|
|
|
|
|
|
|
|
SET(MAXSDK_DEFINITIONS -DUNICODE -D_UNICODE)
|
|
|
|
|
|
|
|
ELSE()
|
|
|
|
|
|
|
|
SET(MAXSDK_DEFINITIONS)
|
|
|
|
|
|
|
|
ENDIF()
|
|
|
|
ELSE()
|
|
|
|
ELSE()
|
|
|
|
set(MAXSDK_LIBRARIES)
|
|
|
|
set(MAXSDK_LIBRARIES)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|