Closed Maggeych closed 8 years ago
Thanks! Merged. Hmmm, just noticed, after merging, shouldnt the JPEG_AVAILABLE
flag be set by the find_package(JPEG REQUIRED)
line?
Ah. I think the find_package
will only set internal cmake variables right? And then we need the add_definitions
to add the #define
, that can be detected within the C++ code, right? So I think that your changes seem good :-)
I think it might be worth merging LIBJPEG_AVAILABLE
and BUILD_JPEG_SUPPORT
, so we just have BUILD_JPEG_SUPPORT
. Seems like they are semantically the same right? (I guess historically they might have been slightly different, but I probably removed some detection step, and now they are the same essentially).
Basically one could simply run find_package(JPEG) without the required flag and then use the JPEG_FOUND variable set by FindJPEG.cmake to add the define flag. But this would mean that JPEG always gets linked into DeepCL if it's installed. I think it's better to let the user choose whether to compile with JPEG support or not.
Yes, agree. Thank-you Maggeych.
In order to link against DeepCL using cmake's find_package function I added the generation of a cmake config file. Furthermore the loader for a manifest txt file was not enabled even though BUILD_JPEG_SUPPORT was set to ON. To enable manifests as input to deepcl_predict I changed the loader to GenericLoaderv2 in src/main/predict.cpp.