geoffmcl / glew

Fork of The OpenGL Extension Wrangler Library
Other
0 stars 0 forks source link

Deal with INSTALL, first of x64 #3

Open geoffmcl opened 6 years ago

geoffmcl commented 6 years ago

Reviewing my previous x64 install it is quite a mess

 Directory of X:\3rdParty.x64\bin
2016-12-14  15:06           402,432 glew32.dll
2016-12-14  15:06           663,552 glew32d.dll
2017-03-09  15:40           402,432 glew64.dll
2017-03-09  15:39           663,552 glew64d.dll
2017-03-09  15:40           368,640 glewinfo.exe

 Directory of X:\3rdParty.x64\include\GL
2016-07-24  00:43         1,058,609 glew.h
2016-07-24  00:43            64,124 wglew.h

 Directory of X:\3rdParty.x64\lib
2016-12-14  15:06           621,984 glew32.lib
2016-12-14  15:06           625,128 glew32d.lib
2016-12-14  15:06         1,323,008 glew32d.pdb
2017-03-09  15:40           621,984 glew64.lib
2017-03-09  15:39           625,128 glew64d.lib
2017-03-09  15:39         1,323,008 glew64d.pdb
2016-12-14  15:06         1,673,118 libglew32.lib
2016-12-14  15:06         1,510,792 libglew32d.lib
2017-03-08  15:16         1,673,118 libglew64.lib
2017-03-08  15:15         1,510,800 libglew64d.lib
2017-03-09  15:40         1,673,118 libglew64_s.lib
2017-03-09  15:39         1,510,800 libglew64_sd.lib

 Directory of X:\3rdParty.x64\lib\cmake\glew

2016-07-24  00:43             2,286 glew-config.cmake
2017-03-09  15:39             1,444 glew-targets-debug.cmake
2017-03-09  15:39             1,460 glew-targets-release.cmake
2017-03-09  15:39             3,441 glew-targets.cmake

 Directory of X:\3rdParty.x64\lib\pkgconfig

2017-03-08  15:15               256 glew.pc

     Total Files Listed:
              24 File(s)     18,324,214 bytes

Note the ugly mixture of 32 and 64. This seems wrong and unnecessary. Note this folder already has an x64 indication, and I do not think 32 and 64 should be at anytime be mixed in the same directory. The 32 comes from the platform name of WIN32 and this is maybe ok, but the use of 64 seems wrong!

It appears at some time a prefix of lib was added to the static library, and an _s added? But see #1 ... it seems sufficient that it be called glew32s.lib and glew32sd.lib...

It seems my cmake 3.10.2 now includes a FindGLEW.cmake module, so I should carefully check this ... ok it has -

  find_library(GLEW_LIBRARY_RELEASE NAMES GLEW glew32 glew glew32s PATH_SUFFIXES lib64 libx32)
  find_library(GLEW_LIBRARY_DEBUG NAMES GLEWd glew32d glewd PATH_SUFFIXES lib64)

This seems to establish the name should be glew32s only, and it is strange that it does not include glew32sd...

Need to first clean up my current messy install... and check carefully through other FindGLEW.cmake that I have used over the years when one was not included with the cmake distribution, or even where I decided I needed a local version to correct for the above seeming error...

Lots to think about, explore and understand here...

Would really appreciate feedback from other who use this great library in Windows... thanks...

geoffmcl commented 6 years ago

First to examine the current install targets -

Release config install -

<INSTALL_ROOT>\bin\glew32.dll
<INSTALL_ROOT>\bin\glewinfo.exe
<INSTALL_ROOT>\bin\visualinfo.exe
<INSTALL_ROOT>\include\GL\glew.h
<INSTALL_ROOT>\include\GL\glxew.h
<INSTALL_ROOT>\include\GL\wglew.h
<INSTALL_ROOT>\lib\cmake\glew\CopyImportedTargetProperties.cmake
<INSTALL_ROOT>\lib\cmake\glew\glew-config.cmake
<INSTALL_ROOT>\lib\cmake\glew\glew-targets-release.cmake
<INSTALL_ROOT>\lib\cmake\glew\glew-targets.cmake
<INSTALL_ROOT>\lib\glew32.lib
<INSTALL_ROOT>\lib\glew32s.lib
<INSTALL_ROOT>\lib\pkgconfig\glew.pc

Debug config install -

<INSTALL_ROOT>\bin\glew32d.dll
<INSTALL_ROOT>\bin\glewinfo.exe
<INSTALL_ROOT>\bin\visualinfo.exe
<INSTALL_ROOT>\include\GL\glew.h
<INSTALL_ROOT>\include\GL\glxew.h
<INSTALL_ROOT>\include\GL\wglew.h
<INSTALL_ROOT>\lib\cmake\glew\CopyImportedTargetProperties.cmake
<INSTALL_ROOT>\lib\cmake\glew\glew-config.cmake
<INSTALL_ROOT>\lib\cmake\glew\glew-targets-debug.cmake
<INSTALL_ROOT>\lib\cmake\glew\glew-targets.cmake
<INSTALL_ROOT>\lib\glew32d.lib
<INSTALL_ROOT>\lib\glew32d.pdb
<INSTALL_ROOT>\lib\glew32sd.lib
<INSTALL_ROOT>\lib\pkgconfig\glew.pc

That immediately points out another small problem. If you installed the DEBUG config after the RELEASE config, the Debug EXE's would overwrite the Release EXE's. But that can be easily fixed in CMakeLists.txt....

geoffmcl commented 6 years ago

Ok, with the above commit the Debug config install becomes -

<INSTALL_ROOT>\bin\glew32d.dll
<INSTALL_ROOT>\bin\glewinfod.exe
<INSTALL_ROOT>\bin\visualinfod.exe
<INSTALL_ROOT>\include\GL\glew.h
<INSTALL_ROOT>\include\GL\glxew.h
<INSTALL_ROOT>\include\GL\wglew.h
<INSTALL_ROOT>\lib\cmake\glew\CopyImportedTargetProperties.cmake
<INSTALL_ROOT>\lib\cmake\glew\glew-config.cmake
<INSTALL_ROOT>\lib\cmake\glew\glew-targets-debug.cmake
<INSTALL_ROOT>\lib\cmake\glew\glew-targets.cmake
<INSTALL_ROOT>\lib\glew32d.lib
<INSTALL_ROOT>\lib\glew32d.pdb
<INSTALL_ROOT>\lib\glew32sd.lib
<INSTALL_ROOT>\lib\pkgconfig\glew.pc

This looks like a good install...