Closed Haruma-VN closed 11 months ago
You should either include the machine-specific subdirectories (arm/
, intel/
, etc.) depending on your target platform, or disable the machine-specific code via macros, as it is done, for example, in scripts/makefile.clang
.
I think should also work:
CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 -DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0"
It appears that when I add this to my CMakeLists it worked:
if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
target_compile_definitions(${PROJECT_NAME} PUBLIC PNG_ARM_NEON_OPT=0)
endif()
But still, thank you for your kind responses.
I am using CMAKE with libpng to support cross platform, however when tried to compile the shared library to the Android platform an error occured.
Here is my CMakeLists.txt
Here is the error:
I would like some help to compile this library for my project, glad if someone helped.