LoginSignup
0
0

More than 5 years have passed since last update.

mruby-cliに付属のosxcrossでcmakeを使うには

Posted at

背景

OpenCVを使ってWebカメラの表示ができるmrbgemのmruby-webcamをmruby-cliでビルド可能にした際に分かった。

cmakeの不具合

mruby-cli付属のosxcrossを使ってcmakeなライブラリをクロスコンパイルすると、
動かない。

対策

リンク先に書いてある通り、

/usr/share/cmake-2.8/Modules/Platform/Darwin.cmakeを以下のように修正する。

--- Darwin.cmake~
+++ Darwin.cmake
@@ -341,7 +341,9 @@
     list(APPEND _apps_paths "${_apps}")
   endif()
 endforeach()
-list(REMOVE_DUPLICATES _apps_paths)
+if(_apps_paths)
+ list(REMOVE_DUPLICATES _apps_paths)
+endif()
 set(CMAKE_SYSTEM_APPBUNDLE_PATH
   ${_apps_paths})
 unset(_apps_paths)
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