-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature cmake basic structure for compilation #19
Conversation
- build only shared libs
- avoid including all opencv stuff
I have tested under Windows and i always i get a SEH error, maybe is related to the platform. I made some improvements in the code that i will commit soon, but for now i'm testing under Ubuntu(WSL) to see if i get the same error or not. |
Under Ubuntu(WSL) i got a similar error:
I think the issue is in the destructor and the versionString variable. I will try to fix this. |
with commit d292c57 i solved the issue see the log running the test:
I need to test under windows but i think it will be fine. I have to change some cmake target includes because they are pointing to opencv and opencv_contrib folder cloned with webarkit_testing repository (they are submodules in there), instead they should be related to them from cmake FetchContent. |
I'm not sure that cmake |
Now the action cript can run the build (cmake) but fails with this message:
this is the same message as i encountered compiling locally. i will see if this can be solved or i will found another solution. |
from the action github log: WebARKitLib/WebARKit/CMakeLists.txt Line 42 in d338779
and: WebARKitLib/WebARKit/CMakeLists.txt Line 74 in d338779
and also the OPENCV_EXTRA_MODULES_PATH: WebARKitLib/WebARKit/CMakeLists.txt Line 52 in d338779
and: WebARKitLib/WebARKit/CMakeLists.txt Line 72 in d338779
|
Now it build process fails at the final stage:
this because the xfeatures2d static lib is not generated. |
I can't find a solution to the last issue: with FetchContent i can't compile the |
So inside the WebARKitLib folder i will create a deps (dependencies folder) where |
I will make a step back because opencv + opencv_contrib are more than one Gb when downloaded, so maybe i will found an alternative option. I can provide binaries and static libs as i already did in opencv-em for other projects. I can develop a script and a github action to upload precompiled libs and headers for opencv and opencv_contrib with opencv-em and then when someone wants compile WebARKitLib will download these. |
i can build opencv builds with |
Tests failing because the last command was for Windows OS, i will fix and surely it will work. |
Now, i think this PR is on the good track to be merged. |
During the tests phase we get this warning:
I will see to solve this one and then i can merge it. |
CMAKE implementation
Preamble
I will provide a minimal cmake implementation to compile the library.
If the library can be compiled with cmake i will provide also some basic test with googletest as i already started.
Final considerations
The library now can be compiled with the CMakeLists.txt file in the WebARKit directory. The result will be the WebARKitLib static lib (libWebARKitLib.a). The static lib is used to make some basic test, i would improve this, adding more of them. I haven't tested on Windows or Mac, i used the linux environment for simplicity. I haven't ttried to compile the libWebARKitLib.a with Emscripten ( with emcmake) but i think the cmake script should be a bit different, because we link the 3dparty zlib (included with OpenCV) but Emscripten has its own zlib. Anyway this will be space for another PR.