Can I compile OpenCV source code from a MacBook M1 to create libraries ( like core and java ) for intel based MacBook

I've already built and created the libraries I needed for my project for Windows [.dll] and Mac OS X (Arm based) [.dylib]. The fact is that, given the processor difference, I don't know If I can make the *.so libraries ( at least I think that the extension of the libraries , from what I've found after searching A LOT ).

If someone knows and says otherwise, I'll take as given that it's not possible to do it. The method I've used is the one via cmake. Example :

cmake -DCMAKE_SYSTEM_PROCESSOR=arm64 \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DWITH_OPENJPEG=OFF \
-DWITH_IPP=OFF \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr/local/opencv \
-D JAVA_INCLUDE_PATH=$JAVA_HOME/include \
-D JAVA_AWT_LIBRARY=$JAVA_HOME/jre/lib/amd64/libawt.so \
-D JAVA_JVM_LIBRARY=$JAVA_HOME/jre/lib/arm/server/libjvm.so \
-D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.5.5/modules \
-D WITH_FFMPEG=OFF \
-D WITH_OPENCL=OFF \
-D BUILD_opencv_java=ON \
-D OPENCV_ENABLE_NONFREE=ON \
-D BUILD_opencv_python2=OFF \
-D BUILD_opencv_python3=OFF \
-D BUILD_ZLIB=OFF \
-D BUILD_EXAMPLES=ON ../opencv-4.5.5 

I know the question is almost stupid, but I'll still want to be sure. Thank you guys <3

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum