LoginSignup
0
0

More than 3 years have passed since last update.

meson で cmake プロジェクトを subproject として使う

Last updated at Posted at 2019-12-30

背景

  • ビルドシステムに meson を使っている
  • submodule などで使う依存ライブラリが cmake しか対応していない

cmake の add_subdirectory のように, meson からも cmake プロジェクトを読み込んで利用したい.

方法

cmake のモジュールがあるのでこれを使います.

https://mesonbuild.com/CMake-module.html#cmake-subprojects
https://github.com/mesonbuild/meson/blob/master/mesonbuild/modules/cmake.py

変数をセットしたい

Is there any way to set cmake CACHED variable? #6345
https://github.com/mesonbuild/meson/issues/6345

set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) 相当もできます(meson cmake module ドキュメントにはちらっと書かれているだけでみおとしがち)

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