MAYA2019のプラグインをビルドしたので覚え書き🔰
MAYA2019プラグインのビルド覚え書き
久しぶりにMAYAプラグインをビルドしたのでその覚え書きです🔰🔰
最近のMAYAはCMakeでビルドするんですね
プラグインの開発環境
- Windows10 64bit
- Visual Studio 2015 Update3が必要(Visual Studio 2017のみインストールした環境ではCMakeでビルドエラーになりました。)
- cmake version 3.14.5
ちなみに、cmakeはChocolateyでインストールしました。
事前設定
readme.mdに書いてあります。
devkitBase\MayaDevkit\README.md
SDKへのパスを環境変数で設定します。
DEVKIT_LOCATION=D:\Users\hoge\Documents\devkitBase
あなたの環境に合わせて読み替えてください。
ビルド手順
手始めに単純なhelloWorldCmdをビルドしてみます。
cd D:\Users\hoge\Documents\MayaDevkitBase\devkit\plug-ins\helloWorldCmd
cmake -H. -Bbuild -G "Visual Studio 14 2015 Win64"
cmake --build build --config Release
補足
Debugモードでビルドするには--config Releaseを削除してください。
ビルド成功時のログ
> cmake -H. -Bbuild -G "Visual Studio 14 2015 Win64"
-- Selecting Windows SDK version to target Windows 10.0.17763.
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Users/hoge/Documents/MayaDevkitBase/devkit/plug-ins/helloWorldCmd/build
> cmake --build build --config Release
Microsoft (R) Build Engine バージョン 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.Checking Build System
CMake does not need to re-run because D:/Users/hoge/Documents/MayaD
evkitBase/devkit/plug-ins/helloWorldCmd
/build/CMakeFiles/generate.stamp is up-to-date.
Building Custom Rule D:/Users/hoge/Documents/MayaDevkitBase/devkit/plug-ins/helloWorldCmd/CMakeLists.txt
CMake does not need to re-run because D:/Users/hoge/Documents/MayaDevkitBase/devkit/plug-ins/helloWorldCmd
/build/CMakeFiles/generate.stamp is up-to-date.
helloWorldCmd.cpp
ライブラリ D:/Users/hoge/Documents/MayaDevkitBase/devkit/plug-ins/helloWorldCmd/build/Release/helloWorld
Cmd.
lib とオブジェクト D:/Users/hoge/Documents/MayaDevkitBase/devkit/plug-ins/helloWorldCmd/build/Release/hello
WorldC
md.exp を作成中
helloWorldCmd.vcxproj -> D:\Users\hoge\Documents\MayaDevkitBase\devkit\plug-ins\helloWorldCmd\build\Releas
e\helloWorldCmd.mll
Building Custom Rule D:/Users/hoge/Documents/MayaDevkitBase/devkit/plug-ins/helloWorldCmd/CMakeLists.txt
CMake does not need to re-run because D:/Users/hoge/Documents/MayaDevkitBase/devkit/plug-ins/helloWorldCmd
/build/CMakeFiles/generate.stamp is up-to-date.