Assuming you just downloaded the binary packages, you might have to build OpenCV yourself to fit your requirements.
You can compare the return value of cv::getBuildInformation()
for each binary package (3.4 and 4.x) and each build flavor (debug/release) that you have.
to be sure: I’m talking about the settings used to build the library, not the settings used to build your application and link against OpenCV.