- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 188
 
Description
Git commit reference
e97ae19 (10.1.2)
Describe the bug
In packaging this for Debian, I removed include/dpp/nlohmann and set -DDPP_USE_EXTERNAL_JSON=ON because Debian packages are supposed to use the packaged versions of libraries when possible.
When I build D++, it does in fact use the external nlohmann::json, but when I try to use it in a bot, it tries to include the internal JSON headers and not the external ones, unless I define DPP_USE_EXTERNAL_JSON in my bot's cmake.
To Reproduce
Steps to reproduce the behavior:
- Build D++ with 
-DDPP_USE_EXTERNAL_JSON=ON - Build a bot using the D++ you just built
 - Notice that it is including 
dpp/nlohmann/json.hpprather thannlohmann/json.hpp, unless you also defineDPP_USE_EXTERNAL_JSONin your bot. 
Expected behavior
When D++ is built with -DDPP_USE_EXTERNAL_JSON=ON, the files include/dpp/json.h and include/dpp/json_fwd.h should be modified to include the external nlohmann::json rather than the internal one, rather than using a preprocessor directive to determine if that flag is set, because then that flag also has to be set for everything that uses D++, rather than sticking when it is used in the original D++ build.
System Details:
- OS: Debian sid