Skip to content

Update ios_conversions.mm - Fix Mac Catalyst compile target #25067

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
danoli3:master
Feb 26, 2024
Merged

Update ios_conversions.mm - Fix Mac Catalyst compile target #25067
asmorkalov merged 1 commit intoopencv:4.xfrom
danoli3:master

Conversation

@danoli3
Copy link
Copy Markdown
Contributor

@danoli3 danoli3 commented Feb 22, 2024

Define fix for Mac Catalyst iOS

Fixes #25066

This fix just wraps the ios_conversions.mm with target condition for not to be used for anything but iOS and not Mac Catalyst. I looked at a cmakelist solution first, easier to define Mac cat in Objective-C++, cmake not yet really a define ready for it.

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@danoli3 danoli3 changed the title Update ios_conversions.mm Update ios_conversions.mm - Fix Mac Catalyst compile target Feb 22, 2024
@danoli3
Copy link
Copy Markdown
Contributor Author

danoli3 commented Feb 22, 2024

After fix:

^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
2 warnings generated.
[  1%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/persistence_yml.cpp.o
[  1%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o
[  2%] Linking CXX static library ../../lib/libopencv_core.a
[ 17%] Built target opencv_core
[ 18%] Built target opencv_flann
[ 30%] Built target opencv_imgproc
[ 33%] Built target opencv_ml
[ 36%] Built target opencv_photo
[ 44%] Built target libprotobuf
[ 67%] Built target opencv_dnn
[ 72%] Built target opencv_features2d
[ 72%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/ios_conversions.mm.o
[ 72%] Linking CXX static library ../../lib/libopencv_imgcodecs.a
[ 76%] Built target opencv_imgcodecs
[ 85%] Built target opencv_calib3d
[ 86%] Built target opencv_highgui
[ 87%] Built target quirc
[ 92%] Built target opencv_objdetect
[ 95%] Built target opencv_stitching
[100%] Built target opencv_video
-- Up-to-date: 

@asmorkalov
Copy link
Copy Markdown
Contributor

/cc @komakai

@asmorkalov asmorkalov added this to the 4.10.0 milestone Feb 22, 2024
Copy link
Copy Markdown
Contributor

@VadimLevin VadimLevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define fix for Mac Catalyst iOS
@danoli3
Copy link
Copy Markdown
Contributor Author

danoli3 commented Feb 26, 2024

@VadimLevin Just rebased on 4.x and removed that trailing whitespace!

@asmorkalov asmorkalov merged commit faba2d8 into opencv:4.x Feb 26, 2024
@asmorkalov asmorkalov mentioned this pull request Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MacCatalyst iOS compile error cmake ios_conversions.mm

3 participants