-
Notifications
You must be signed in to change notification settings - Fork 5
Building a 3ds max CMake projects
Lukas Cone edited this page Mar 18, 2022
·
2 revisions
Following guide will show, how to use CMake to create and build a 3ds max project.
A variables in this document are presented with a ${}
braces.
For example: A platform_type = ${platform}
will mean platform_type = x64
, just like in the CMake syntax.
Used variables:
-
${platform}
can beWin32
orx64
-
${MAX_VERSION}
a 3ds max version
- Head to the root of a cloned repo (where the CMakeLists.txt is)
- Create
build
folder and navigate to it. - Create a folder in a style of a
${platform}_${MAX_VERSION}
, and navigate to it. (Example:x64_2017
) - Generate your project with a
cmake
command (usecmake --help
to get list of generators).
Additional CMake arguments:-
-Tv140
= sets the v140 toolset (VS2015) -DMAX_VERSION=${MAX_VERSION}
-
-DMaxDirectory=${path}
(optional) where${path}
is a path to a 3ds max directory (default:C:/Program Files/Autodesk/3ds max ${MAX_VERSION}
)
-
- Build with the CMake:
cmake --build . --config ${config_type} --target ALL_BUILD --
Where${config_type}
can be:-
RelWithDebInfo
orDebug
: A binary files will be built in a specified 3ds maxplugins
folder. (${MaxDirectory}/plugins
) -
Release
: A binary will be built in abin/${platform}_${MAX_VERSION}
folder.
-
mkdir build
cd build
mkdir x64_2017
cd x64_2017
cmake "-GVisual Studio 16 2019" -Tv140 -Ax64 -DMAX_VERSION=2017 ../..
cmake --build . --config Release --target ALL_BUILD --