GreycLab / gmic

GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
Other
66 stars 11 forks source link

Add -DCURL_STATICLIB to if(BUILD_LIB_STATIC)... in CMakeLists.txt #50

Open butcherg opened 3 months ago

butcherg commented 3 months ago

I'm incorporating libgmic into rawproc, my WIN32 target is compiled by mxe, an all-static toolchain. rawproc link errors out on libgmic undefined references to '__imp_curl_easy*' calls.

What's needed is a ADD_DEFINITIONS(DCURL_STATICLIB ) to theif(BUILD_LIB_STATIC) ... endif() block in CMakeLists.txt to compel libgmic to use the curl static calls. Probably also need the equivalent in src/Makefile, but I haven't researched that one.

ref: https://curl.se/docs/faq.html#Link_errors_when_building_libcur