Skip to content

Commit

Permalink
Build both x86_64 and arm64 for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
yushulx committed Jan 14, 2025
1 parent 00468f9 commit 2c114b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions litecam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ elseif (UNIX AND NOT APPLE)
src/CameraPreviewLinux.cpp
)
elseif (APPLE)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
# Ensure that Objective-C++ source files are compiled as Objective-C++
set(LIBRARY_SOURCES
src/CameraMacOS.mm
Expand Down
3 changes: 3 additions & 0 deletions litecam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ LiteCam is a lightweight, cross-platform library for capturing RGB frames from c
mkdir build && cd build
cmake ..
cmake --build .
## macOS: Use the lipo tool to inspect the architectures included in the .dylib
lipo -info liblitecam.dylib
```

3. Link the library to your project.
Expand Down
Binary file modified litecam/dist/lib/macos/liblitecam.dylib
Binary file not shown.

0 comments on commit 2c114b1

Please sign in to comment.