Printing libraries version and other info

I found it quite difficult to know what libraries are actually in use.

I think it would be great to have a fast way to do that. Printing version number and license type. Version number could be easier to maintain but license type would have to be done entirely by hand.

I tried my best to start a print that could be included somehow in the core, but I did not manage to print some libraries yet. For example, FreeImage and FreeType macros are only available inside ofImage and ofTrueType font (don’t know exactly why…). GLUT, OpenSSL and Poco no idea…

Please let me know if anyone thinks that could go to core and what would be the best way to do it.

    std::cout << "OpenGL version "
        << glGetString(GL_VERSION)
        << std::endl;

    std::cout << "Boost version "
        << BOOST_VERSION / 100000 << "."        
        << BOOST_VERSION / 100 % 1000 << "."    
        << BOOST_VERSION % 100                    
        << std::endl;

    std::cout << "Cairo version "
        << CAIRO_VERSION_MAJOR << "."        
        << CAIRO_VERSION_MINOR << "."        
        << CAIRO_VERSION_MICRO                
        << std::endl;

    /*
    std::cout << "FreeImage "
        << FREEIMAGE_MAJOR_VERSION << "."        
        << FREEIMAGE_MINOR_VERSION << "."        
        << FREEIMAGE_RELEASE_SERIAL                
        << std::endl;

    std::cout << "FreeType "
        << FREETYPE_MAJOR << "."        
        << FREETYPE_MINOR << "."        
        << FREETYPE_PATCH                
        << std::endl;
        */

    fprintf(stdout, "GLEW version %s\n", glewGetString(GLEW_VERSION));

    std::cout << "GLFW version "
        << GLFW_VERSION_MAJOR << "."        
        << GLFW_VERSION_MINOR << "."        
        << GLFW_VERSION_REVISION            
        << std::endl;

    fprintf(stdout, "GLU version %s\n", gluGetString(GLU_VERSION));

    /*
    fprintf(stdout, "GLUT %s\n", glutGetString(GLUT_API_VERSION));
    fprintf(stdout, "GLUT %s\n", glutGetString(KISSFFT_VERSION));

    */

    std::cout << "openFrameworks version "
        << OF_VERSION_MAJOR << "."        // major version
        << OF_VERSION_MINOR << "."        // minor version
        << OF_VERSION_PATCH                // micro version
        << std::endl;

    /*
    std::cout << "OpenSSL version "
        << SSLEAY_VERSION << 
        << OPENSSL_VERSION_NUMBER(3) << endl;
        std::cout << "OpenSSL version "
        << OPENSSL_VERSION_TEXT << endl;
        */
    /*
    std::cout << "Poco version "
        << POCO_VERSION << std::endl;
        */