Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Build without audio support  (Read 2715 times)

0 Members and 2 Guests are viewing this topic.

tmac

  • Guest
Build without audio support
« on: April 22, 2013, 11:49:26 pm »
Hi!

It would be useful to be able to build SFML with no audio support.

I use SFML with C++ for scientific plotting on Linux, and I do not have administrative rights on my university computer. Also, it has no audio libraries installed system-wide. Being able to deactivate all audio dependencies at build-time via some CMake option would be very helpful.

Best regards
Torquil Sørensen

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Build without audio support
« Reply #1 on: April 23, 2013, 12:15:27 am »
Afaik you should be able to generate the make files/project files also on a PC without audio support. From there you can then choose to only build the graphics, window, system and network modules without the audio module. Or you might even be able to build all of them and just not use the audio module in your application.

Since you don't state it, have you run into any specific error, we might help you with?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

tmac

  • Guest
Re: Build without audio support
« Reply #2 on: April 23, 2013, 02:01:48 pm »
Thanks, that is interesting and helpful. If SFML is so modular that this is possible that would be great. However, this time I was able to build and install the necessary audio libraries in my home directory, and have now also successfully compiled and installed a git snapshot of SFML, so everything is working fine now.

I might have to compile SFML again some time, and then I will try to see if I can do without any audio libraries.

Thanks!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Build without audio support
« Reply #3 on: April 23, 2013, 02:22:35 pm »
You can build SFML modules one by one and skip sfml-audio, if... you have the makefiles. But you will never be able to generate them, since there's no way to force CMake to skip generating the sfml-audio project (I could easily add an option for that though), and it will fail if you haven't got all the required dependencies (libsndfile and openal).

However, as you figured, there's no problem to install the dependencies in your home folder rather than in /usr ;)
Laurent Gomila - SFML developer

 

anything