Started to see this going sideways. ![]()
This will work till the inevitable (and previously unstated) exceptions, caveats, restrictions, ifs, ands, and buts infiltrate.

If you can get a LM339, great, use a section of that.
If you have an opamp, you can try that, it should work.
The CdS will have to be "intensely irradiated" to trip the comparator output.
The voltage divider (R1 and R2) establishes the threshold (trip) voltage.
If "Vin" won't go low enough, with the CdS illuminated, then increase the value of R1.