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?

opencv をtarget arm64 でビルドする

Last updated at Posted at 2024-06-09

概要

opencv をtarget arm64 でビルドして、
それをカスタムのパスにインストールする時のコマンドについてです。

方法

opencv/CMakeLists.txtに

opencv/CMakeLists.txt
set(CMAKE_OSX_ARCHITECTURES "arm64")

を追加します。

その後、

cmake .. -DCMAKE_INSTALL_PREFIX=/opt/opencv-arm64 -DOPENCV_EXTRA_MODULES_PATH=/Users/xxx/Documents/opencv_contrib/modules

としてビルドして、

make install

をすると、この場合だと

/opt/opencv-arm64

にインストールされるので、他のライブラリからこちらにリンクしたりインクルードします。

ちなみにboostは

(myenv) ➜  boost_1_75_0 sudo ./b2 install --prefix=/opt/boost-arm64 cxxflags="-arch arm64" linkflags="-arch arm64" --with-serialization
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?