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

Author Topic: Create Launchers for Examples Using CMake  (Read 4219 times)

0 Members and 2 Guests are viewing this topic.

firefly2442

  • Newbie
  • *
  • Posts: 23
    • View Profile
Create Launchers for Examples Using CMake
« 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Create Launchers for Examples Using CMake
« Reply #1 on: October 25, 2012, 08:06:21 am »
Why?
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: Re: Create Launchers for Examples Using CMake
« Reply #2 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...
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Create Launchers for Examples Using CMake
« Reply #3 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.
Laurent Gomila - SFML developer

Foaly

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
Re: Create Launchers for Examples Using CMake
« Reply #4 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?
« Last Edit: October 25, 2012, 11:51:09 am by Foaly »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Create Launchers for Examples Using CMake
« Reply #5 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. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

firefly2442

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Create Launchers for Examples Using CMake
« Reply #6 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. :)

 

anything