
Windows 11 に CMake をインストールする方法です。
CMake
CMake は、ビルド自動化のためのツールで、Windows、 macOS、 Linux などのクロスプラットフォームに対応しています。
ダウンロード

以下よりダウンロードします:
- Download | CMake
https://cmake.org/download/
この例では「Windows x64 Installer (cmake-3.26.0-windows-x86_64.msi)」をダウンロードしました。
この際、お使いの環境が 32 ビットの場合は、「Windows i386 Installer (cmake-3.26.0-windows-i386.msi)」を選択します。
お使いの環境が 64 ビット環境 (x64) か 32 ビット環境 (x86) か不明な場合は、次のサポート記事をご参照ください:
ダウンロードが完了したら[ファイルを開く]をクリックします。
インストール

「Welcome to the CMake Setup Wizard」と表示されたら[Next]をクリックします。

「End-User License Agreement」が表示されたら内容をよく確認し、同意できる場合は「I accespt the terms in the License Agreement」にチェックを入れ、[Next]をクリックします。

「Install Options」が表示されたら以下の何れかを選択して[Next]をクリックします:
- Do not add CMake to the system PATH
- Add CMake to the system PATH for all users
- Add CMake to the system PATH for the current user

この例では、「Add CMake to the system PATH for the current user」を選択しました。

「Destination Folder」が表示されたら[Next]をクリックします。

「Ready to install CMake」と表示されたら[Install]をクリックします。

「ユーザー アカウント制御」が表示されたら[はい]をクリックします。

インストールが完了するまで待ちます。

「Completed the CMake Setup Wizard」と表示されたら、[Finish]をクリックします。
動作確認
cmake はコマンド プロンプトから実行することが多いため、コマンド プロンプトから各種確認を行います。コマンド プロンプトを開く方法については、次のサポート記事をご参照ください:
cmake の場所を確認するには、次のコマンドを実行します:
where cmake
実行例:
Microsoft Windows [Version 10.0.22621.525]
(c) Microsoft Corporation. All rights reserved.
C:\Users\Owner>where cmake
C:\Program Files\CMake\bin\cmake.exe
cmake を実行するには、次のコマンドを実行します:
cmake
実行例:
Microsoft Windows [Version 10.0.22621.525]
(c) Microsoft Corporation. All rights reserved.
C:\Users\Owner>cmake
Usage
cmake [options] <path-to-source>
cmake [options] <path-to-existing-build>
cmake [options] -S <path-to-source> -B <path-to-build>
Specify a source directory to (re-)generate a build system for it in the
current working directory. Specify an existing build directory to
re-generate its build system.
Run 'cmake --help' for more information.
cmake-gui をコマンド プロンプトから起動する場合は、次のコマンドを実行します:
cmake-gui
実行例:
Microsoft Windows [Version 10.0.22621.525]
(c) Microsoft Corporation. All rights reserved.
C:\Users\Owner>cmake-gui

GUI ウィンドウが表示されたところ。
以下の手順でも GUI ウィンドウを表示できます。

[スタート]をクリックし、[すべてのアプリ]をクリックします。

一覧から[CMake (cmake-gui)]をクリックします。
※CMake の動作に C++ コンパイラが必要な場合は、Microsoft Visual Studio 2022 などのインストールをご検討ください。Microsoft Visual Studio 2022 のインストールについては、次のサポート記事をご参照ください:
参考文献等
- CMake – Wikipedia
https://ja.wikipedia.org/wiki/CMake - CMake / CMake · GitLab
https://gitlab.kitware.com/cmake/cmake
注意
- 本操作例は、 Windows 11 に CMake (Ver.3.26.0) をインストールするものです
スポンサードリンク