Merge pull request #25631 from asmorkalov:as/png_build_fix

Fixed CMake Missing variable is: CMAKE_ASM_COMPILE_OBJECT in PNG build #25631

Error message with `-DBUILD_PNG=ON` on ARM64:
```
-- Configuring done
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_ASM_COMPILE_OBJECT
-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
```

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] 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
- [x] The PR is proposed to the proper branch
- [x] 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
This commit is contained in:
Alexander Smorkalov 2024-05-23 17:14:01 +03:00 committed by GitHub
parent 16b5096ed0
commit 4824354e46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,11 +3,7 @@
#
# ----------------------------------------------------------------------------
if(ENABLE_NEON)
project(${PNG_LIBRARY} C ASM)
else()
project(${PNG_LIBRARY} C)
endif()
project(${PNG_LIBRARY} C)
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU AND NOT EMSCRIPTEN)
find_library(M_LIBRARY m)
@ -59,6 +55,7 @@ if(TARGET_ARCH MATCHES "^(ARM|arm|aarch)")
elseif(NOT PNG_ARM_NEON STREQUAL "off")
list(APPEND lib_srcs arm/arm_init.c arm/filter_neon_intrinsics.c arm/palette_neon_intrinsics.c)
if(NOT MSVC)
enable_language(ASM)
list(APPEND lib_srcs arm/filter_neon.S)
endif()
if(PNG_ARM_NEON STREQUAL "on")