Qt5.5 for VisualStudio2015 from Source
はじめに
VisualStudio2015でQtを使いたかったのですが、現在リリースされているやつはまだ対応してない?みたいで仕方なくソースからビルドすることにしました。
以下のサイトを参考に進めました。
Qt for Windows - Building from Source | Qt 5.5
ソースの取得
最初はgitからクローンしてやろうと思ってたのですが、ソースの初期化でエラーが発生したため、Qt - Downloadからソースをダウンロードしてきました。
自分はC:の直下に展開しました。
必要な環境変数の指定
ConfigureやBuildのための環境変数を設定します。
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 set QTDIR=C:\qt5.5\qtbase set PATH=%QT_DIR%\bin;%PATH% set QMAKESPEC=win32-msvc2015
Configure
## dynamic link configure -debug-and-release -opensource -platform win32-msvc2015 -opengl desktop -nomake examples -nomake tests ## static link configure -debug-and-release -opensource -platform win32-msvc2015 -opengl desktop -static -nomake examples -nomake tests
exampleなしのリンク
Build
nmake nmake install
jomが使える場合はjomのほうが早いらしいです。
これで終了。
時間はかかるが、簡単ですね。
あとでVisual Studio 2015用のAdd-inも追加します。