Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You should either trust the OS to package GL, or vendor it yourself.

If you trust your build environment, then -lGL is the right answer. If you do not, then vendoring libGL is the right answer. Both approaches are easy to achieve with make.

find_package semantics are frankly weird: "maybe use the OS version, or override in nonstandard ways, or maybe download some version from somewhere and build it using some compiler flags that came from somewhere mysterious. If you succeed, have package-dependent side effects on the set of global variables in my cmake script".

Does it have a higher chance of producing a binary in dodgy environments? Sure. Are those binaries actually reproducible or what the developer / distribution tested with? Absolutely not.

As for windows with visual studio: Either point make at the visual studio compiler, or hand maintain a separate .SLN file. The impedance mismatch between Unix and Windows builds is too great, and the auto-generated .SLN files that tools like cmake produce are low quality.



This is the perfect non-answer.

The question I asked is simple. CMake has an answer. Make has more questions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: