Linux版OpenSiv3Dでビルド時によくあるエラー
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:607 (message): A required package was not found
code:エラーメッセージ例
CMake Error at CMakeLists.txt:25 (find_package):
By not providing "ライブラリ名.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"ライブラリ名", but CMake did not find one.
Could not find a package configuration file provided by "ライブラリ名" with
any of the following names:
ライブラリ名Config.cmake
ライブラリ名-config.cmake
Add the installation prefix of "ライブラリ名" to CMAKE_PREFIX_PATH or set
"ライブラリ名_DIR" to a directory containing one of the above files. If
"ライブラリ名" provides a separate development package or SDK, be sure it has
been installed.
OpenSiv3Dが要求するライブラリが見つからないときに出てくるエラーです。
GitHub Actionsの構成ファイルを参考に、必要なライブラリがインストールされているか確認してください。
https://github.com/Siv3D/OpenSiv3D/blob/main/.github/workflows/ubuntu.yml#L23
Ubuntuの場合、多くのライブラリでsudo apt -y install lib[ライブラリ名]-devという名前でインストールできます。
#Linux #CMake #トラブル