matus-chochlik / oglplus

OGLplus is a collection of open-source, cross-platform libraries which implement an object-oriented facade over the OpenGL® (version 3 and higher) and also OpenAL® (version 1.1) and EGL (version 1.4) C-language APIs. It provides wrappers which automate resource and object management and make the use of these libraries in C++ safer and more convenient.
http://oglplus.org/
Boost Software License 1.0
491 stars 72 forks source link

FindPNG on windows (libpng instead of png) #60

Closed ucacaxm closed 10 years ago

ucacaxm commented 10 years ago

hi,

In FindPNG.cmake on Windows I have to modify this line oglplus_common_find_module(PNG png png.h png)

to this one oglplus_common_find_module(PNG png png.h libpng)

since the libpng I have installed (http://gnuwin32.sourceforge.net/packages/libpng.htm) names the lib as libpng.lib/dll and the oglplus_common_find_module macro search for the exact name (on Linux it search libpng).

For freeglut I do not have the problem since the lib file is freeglut.lib. Maybe there is a way to tell find_library to search the exact file and file with 'lib' prefix ?

Best, alex

matus-chochlik commented 10 years ago

Hi,

Does this happen with MSVC ? If so, then IMHO the solution to this is to use correct library naming conventions for the used platform/compiler. gnuwin32 uses the POSIX(?) naming convention with the `lib`` prefix, but MSVC does not and cmake respects this when looking for libraries, so the 'right' thing would be to rename the library to png.lib.

BR,

matus

ucacaxm commented 10 years ago

Yes it is with visual studio. You're right, I rename the lib. Thank you alex

2014-04-16 8:18 GMT+02:00 Matus Chochlik notifications@github.com:

Hi,

Does this happen with MSVC ? If so, then IMHO the solution to this is to use correct library naming conventions for the used platform/compiler. gnuwin32 uses the POSIX(?) naming convention with the lib` prefix, but MSVC does not and cmake respects this when looking for libraries, so the 'right' thing would be to rename the library to png.lib.

BR,

matus

— Reply to this email directly or view it on GitHubhttps://github.com/matus-chochlik/oglplus/issues/60#issuecomment-40566728 .