SFML community forums

General => Feature requests => Topic started by: firefly2442 on October 25, 2012, 04:55:53 am

Title: Create Launchers for Examples Using CMake
Post by: firefly2442 on October 25, 2012, 04:55:53 am
I'm not sure if this is possible but it would be great if there was a checkbox option in CMake to create launchers for the examples based on the platform that is being used.  For example, under Windows it would create a batch file that sets the appropriate PATH for the libraries that are needed.  Under Linux, maybe it's a BASH script that appends the LD_LIBRARY_PATH for the library.

Thoughts?
Title: Re: Create Launchers for Examples Using CMake
Post by: Laurent on October 25, 2012, 08:06:21 am
Why?
Title: AW: Re: Create Launchers for Examples Using CMake
Post by: eXpl0it3r on October 25, 2012, 08:45:49 am
Why?
I guess so you could just execute the examples without having to copy the dlls.
This doesn't really make that much sense, specially if you compile statically...
Title: Re: Create Launchers for Examples Using CMake
Post by: Laurent on October 25, 2012, 09:02:26 am
And people will have to copy the DLLs for their own project anyway, so it would be confusing to provide a way to skip this step for the precompiled examples.
Title: Re: Create Launchers for Examples Using CMake
Post by: Foaly on October 25, 2012, 11:43:25 am
Why don't you put the Sfml-directory/lib in your PATH variable if you don't want to copy the dlls for every example?
Title: Re: Create Launchers for Examples Using CMake
Post by: eXpl0it3r on October 25, 2012, 11:52:35 am
Why don't you put the Sfml-directory/lib in your PATH variable if you don't want to copy the dlls for every example?
If you install SFML (make install/build the INSTALL project) you'd only need to copy the DLLs once for all examples. ;)
Title: Re: Create Launchers for Examples Using CMake
Post by: firefly2442 on October 25, 2012, 04:10:41 pm
Yeah, I guess compiling statically makes this pointless.  I would rather not put the /lib/ path into my PATH variable because that doesn't seem like a good solution long term.  See here:

http://linuxmafia.com/faq/Admin/ld-lib-path.html

I found the static compile checkbox in CMake and used that (awesome) so everything seems to work.  Cheers. :)