About ofxopencv for emscripten

I want to use opencv in emscripten environment with opencv2/ximgproc.hpp class
so at first I made lib in this tutorial.
https://docs.opencv.org/3.4.0/d4/da1/tutorial_js_setup.html
I used this python ./platforms/js/build_js.py build_wasm --build_wasm
next add extra module and check on opencv_* by cmake-gui.
and ran make
at last I got these lib file
libopencv_aruco.a
libopencv_bgsegm.a
libopencv_bioinspired.a
libopencv_calib3d.a
libopencv_ccalib.a
libopencv_core.a
libopencv_datasets.a
libopencv_dnn.a
libopencv_dnn_objdetect.a
libopencv_dpm.a
libopencv_face.a
libopencv_features2d.a
libopencv_flann.a
libopencv_fuzzy.a
libopencv_hfs.a
libopencv_highgui.a
libopencv_img_hash.a
libopencv_imgcodecs.a
libopencv_imgproc.a
libopencv_line_descriptor.a
libopencv_ml.a
libopencv_objdetect.a
libopencv_optflow.a
libopencv_phase_unwrapping.a
libopencv_photo.a
libopencv_plot.a
libopencv_reg.a
libopencv_rgbd.a
libopencv_saliency.a
libopencv_shape.a
libopencv_stereo.a
libopencv_stitching.a
libopencv_structured_light.a
libopencv_superres.a
libopencv_surface_matching.a
libopencv_text.a
libopencv_tracking.a
libopencv_video.a
libopencv_videoio.a
libopencv_videostab.a
libopencv_xfeatures2d.a
libopencv_ximgproc.a
libopencv_xobjdetect.a
libopencv_xphoto.a
liblibprotobuf.a
libzlib.a
so next I replaced
openFrameworks/addons/ofxOpenCv/libs/opencv/* by these *.a and header file
it’ path is this
openFrameworks/addons/ofxOpenCv/libs/opencv/lib/emscripten
openFrameworks/addons/ofxOpenCv/libs/opencv/include
and rewrote
openFrameworks/addons/ofxOpenCv/addon_config.mk.

Then I built my opencv sample(I checked this source is working before convert)
its compile is OK but not work.
it output is this
missing function: _ZN2cv9softfloatC1Ei
-1
-1

I understand my method is not good.
So I want to get source code of opencv for ofxopencv for enscriptem.
and add opencv2/ximgproc.hpp then recompile it.
Please tell me how to get it
.

we use this tool to compile all of openframeworks external dependencies: https://github.com/openframeworks/apothecary

You might be able to edit the opencv.sh script in apothecary/formulas and add a patch in the prepare step that changes whatever you need

Thank you .you are right.
First I compiled by this command
./apothecary -t emscripten update opencv
and next ,add contrib and changed flag to include ximgproc by cmake-gui.
and set files.and build my opencv app.
It is good working.
ありがとう