Hello.. this is quite a bit off-topic, but still SFML related so I'll give it a try.
I'm building my own library to concentrate many source files and headers that I'm now just copying between projects and compiling them over and over again, getting lost in where is the last modified version etc. I haven't previous experience with doing so, therefore I've chose to copy someone's else. Well and as I'm big fan of SFML and pretty impressed of how that word Simple fits in there, I tried to copy this one. I was particularly successful in creating similar file system and compiling library. However, I encountered few problems that I'd like to ask about, because SFML doesn't have such. For now I'm compiling my library with Visual Studio 10 and I don't have CMake solution yet, only visual studio project.
- GLEW include path needs to be specified in project using my library
This is biggest catch. When starting a project that should use my library, I include main include file (something like SFML/window.hpp). That file includes glew.h, thus the project that want to use just my library needs to know also about GLEW. I've noticed you're solving this by creating GLcheck.hpp and including it only to .cpp files. This way the user project doesn't have to know about glew. However, I'm using some GL data types defines (GLint) in declarations in headers, therefore I need to have GLEW included also in header. Is there any other work-arround than changing those to native data types?
- Static library size
My library is much smaller than SFML (number of lines, files, etc.), but still size of the resulting static library is greater than all SFML libraries together. I tried to play with project setting so I would get the same as SFML have, but it didn't do big difference. I think there might be problem connected with previous paragraph. If whole GLEW would be linked to static library, it could create such big libraries. (Note that my testing libraries don't exhibit such problem)
- Building both dll and lib whit single configuration(Release, Debug, ..)
I'm pretty interested in how is this possible, because I can only make configuration that produce static library or dynamic (project properties-> configuration properties-> general, configuration type [options: makefile, exe, dll, lib, utility]). This way I need to create one configuration for compiling static(lib) and one for dynamic(dll) library. SFML visual studio project created with Cmake produce both in single configuration e.g Release. Do I have to use Cmake for such option?
I don't know how much you (or people willing to input something to this topic) are familiar with visual studio, I just want to test everything out and solve major problems before getting my hands on Cmake. Anyway, I believe that you're more than competent to answer my questions as similar problems must have been addressed when creating SFML(or any other library). Also if you had some very good source where you learned something about building more advanced libraries (not just sample ones), I'd be more than interested in those.