0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

CMake Generatorの選択画面でVisual Studio2022が表示されない

Posted at

事象

CMake(cmake-gui)を開き、「Configure」ボタンを押した際に表示されるウィンドウにて、使用するジェネレーターを選択する箇所がある。そこで「Visual Studio 17 2022」が表示されず、選択できない。

発生バージョン

CMake 3.20.0

原因

CMakeのバージョンが古く、Visual Studio2022に対応していなかった。
※Visual Studio 2022に対応している最低バージョンは3.21。

その他、原因特定までに調べたこと

「C++ デスクトップ開発」ワークロードがインストールされているか

これがないとCMakeがVisual Studioをgeneratorとして認識しない。


環境変数(PATH)にVisual Studioの情報があるか

CMakeは内部でvswhereを使ってVisual Studioの場所を探しているため、vswhere.exeまでのパスを環境変数に設定しているか確認。
例:
C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?