lfreist / hwinfo

cross platform C++ library for hardware information (CPU, RAM, GPU, ...)
MIT License
477 stars 85 forks source link

fix windows ninja build failed #103

Closed Hlongyu closed 2 months ago

Hlongyu commented 2 months ago

https://github.com/lfreist/hwinfo/issues/102

lfreist commented 2 months ago

Do you know, why the static postfix is necessary on windows? Shouldn't the .dll/.lib file extensions be sufficient to indicate static and dynamic builds?

Hlongyu commented 2 months ago

Do you know, why the static postfix is necessary on windows? Shouldn't the .dll/.lib file extensions be sufficient to indicate static and dynamic builds?

On the Windows platform, it's true that 'static' is not needed in the naming of static libraries. However, I noticed that Ninja seems to compile both dynamic and static libraries simultaneously which use same OUTPUT_NANE, and I misunderstood the meaning of OUTPUT_NAME. Adding '_static' was a mistake; I'll fix it tomorrow.

Hlongyu commented 2 months ago

I think we need an option to use shared or static.
Like https://github.com/recp/cglm/blob/48839a38a14a653c233693fa911348ce58d57167/CMakeLists.txt#L14

lfreist commented 2 months ago

Thank you! One last thing: The system_info_standalone target must be removed from the tests.