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

Author Topic: SFGUI (0.4.0 released)  (Read 402496 times)

0 Members and 5 Guests are viewing this topic.

Naufr4g0

  • Full Member
  • ***
  • Posts: 112
    • View Profile
SFGUI
« Reply #30 on: October 30, 2011, 08:46:20 pm »
Quote from: "Tank"
Set SFMLDIR to your SFML directory and BOOST_ROOT to your Boost directory (pay attention at the error messages the search modules give, they normally tell you what variables can be set to use custom search paths).


I tried a lot of combinations, but CMake says me it can't found the libraries!
What files CMake expects to find in SFML and BOOST DIR? .cmake files or .h and .cpp?
Forgive my ignorance on CMake. :'D

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI
« Reply #31 on: October 30, 2011, 08:51:31 pm »
The paths must be set to the root directories of the libraries respectively.

E.g. if you've installed SFML to C:\SFML\, set it to that directory. Same for Boost. For Boost you only need the include directory, since SFGUI doesn't use any compiled libraries.

Naufr4g0

  • Full Member
  • ***
  • Posts: 112
    • View Profile
SFGUI
« Reply #32 on: October 30, 2011, 09:37:50 pm »
Quote from: "Tank"
The paths must be set to the root directories of the libraries respectively.

E.g. if you've installed SFML to C:\SFML\, set it to that directory. Same for Boost. For Boost you only need the include directory, since SFGUI doesn't use any compiled libraries.


Still doesn't work. I'm sure I put the correct folder paths.
May perhaps be because I use the gui version of cmake?

asdatapel

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
SFGUI
« Reply #33 on: October 30, 2011, 11:34:20 pm »
So how do i set the paths? do i do it on the command line with cmake or something?

thePyro_13

  • Full Member
  • ***
  • Posts: 156
    • View Profile
SFGUI
« Reply #34 on: October 31, 2011, 03:19:25 am »
You can use the GUI cmake to set them, you may have to create the variable youself.

The directory you set them to is the same as the install directory you set when configuring cmake for sfml.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
SFGUI
« Reply #35 on: October 31, 2011, 04:19:49 am »
For those who still can't figure out how to use CMake on Windows:

{SFML root directory} is the directory with the SFML source. (I don't like to install libs all over my system so the source copy is good enough.)

[list=1]
  • Run the CMake GUI. (Yes, for those who laugh at GUI users it IS in fact the easier way on Windows.)
  • Enter the SFGUI root directory as source code directory and directory in which to build the binaries. (The directory where the SFGUI CMakeLists.txt is.)
  • Press Configure and select your preferred build system.
  • CMake will then go through the usual probing and stop with a few errors (which are worth reading).
  • If you're running the standard installation you won't have a system-wide CMake modules path set.
  • Check the Grouped and Advanced boxes next to the Add Entry button.
  • Click on Add Entry.
  • Type in

Name: CMAKE_MODULE_PATH
Type: PATH
Value: {SFML root directory}\cmake\Modules (The directory where FindSFML.cmake is.)

  • Press OK and Configure again.
  • In the main treeview area expand the SFML category and fill in all entries in that category.

The SFML_xxx_LIBRARY_yyy-NOTFOUND entries should be the compiled SFML library files themselves. (Not the directories they are in!)
The SFML_INCLUDE_DIR-NOTFOUND should be the directory where the SFML includes can be found: {SFML root directory}\include
If you compiled SFML with only 1 build type then select the same library file for both debug and release.
You do NOT have to fill in the SFML_DIR entry if the others are present.

  • Once done with the previous step, press Configure again.
  • If you compiled SFML as a static library mark the box for SFML_STATIC under the SFML category.
  • If you want to compile SFGUI as a static library mark the box for SFGUI_STATIC under Ungrouped Entries
  • You should be able to configure and generate a project configuration / Makefile now. If CMake complains about missing Boost continue to step 15.
  • Under the Boost category set the Boost_INCLUDE_DIR entry to the directory where the Boost include directory is located.
    (The directory where you find the boost directory in which all the boost headers can be found.)

  • Press configure. Check your settings one last time and press Generate when you're satisfied.
  • Have fun with SFGUI.[/list:o]

    Hopefully I was able to help someone with this list. If not then.. oh well..

    If anybody is going to say this isn't the best/right/whatever way to do it, I am fully aware of that. This is how I got it to work for me on this wonderful operating system. Don't fix that which ain't broken (or a hack that actually works).
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

keyforge

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
SFGUI
« Reply #36 on: October 31, 2011, 02:17:53 pm »
Thanks, binary! I got it working. I'm not very experienced with CMake and that was a good tutorial (the most I've done is compiled SFML 2!).
Need a place to upload your code, files or screenshots? Use SFML Uploads!

Naufr4g0

  • Full Member
  • ***
  • Posts: 112
    • View Profile
SFGUI
« Reply #37 on: October 31, 2011, 02:41:16 pm »
Thanks for the tutorial Binary! Very well done! :)
Unfortunately I've another error.
CMake can't still find the SFML library. :(



Quote from: "keyforge"
Thanks, binary! I got it working. I'm not very experienced with CMake and that was a good tutorial (the most I've done is compiled SFML 2!).


Did you modified some cmake file to make it working?

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI
« Reply #38 on: October 31, 2011, 05:40:27 pm »
Did you try setting SFMLDIR to "C:/sfml/sfml2/"?

asdatapel

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
SFGUI
« Reply #39 on: October 31, 2011, 06:40:33 pm »
god i hate cmake. Is it possible for you to just put up the compiled binaries, like on the download page for sfml?

Naufr4g0

  • Full Member
  • ***
  • Posts: 112
    • View Profile
SFGUI
« Reply #40 on: October 31, 2011, 07:30:24 pm »
Quote from: "Tank"
Did you try setting SFMLDIR to "C:/sfml/sfml2/"?

I already tried it, but it doesn't work. :/

Quote from: "asdatapel"
god i hate cmake. Is it possible for you to just put up the compiled binaries, like on the download page for sfml?


I'm interested too. I use Visual Studio 2010. :)

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI
« Reply #41 on: October 31, 2011, 07:50:51 pm »
Sorry guys, but SFGUI is in heavy development. Maybe it will later be possible to provide nightly/weekly builds, but it just doesn't make sense right now, as too many things change (especially the API).

I don't like CMake that much, too, but compared to many other build tools it's at least portable to a certain degree. ;) If you know other interesting and working tools, let me now.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
SFGUI
« Reply #42 on: October 31, 2011, 08:56:41 pm »
Quote from: "Naufr4g0"
Thanks for the tutorial Binary! Very well done! :)
Unfortunately I've another error.
CMake can't still find the SFML library. :(


"CMake Error at {SFML root directory}/cmake/Modules/FindSFML.cmake ..." is an expected error message after step 9. Proceed with step 10.

If you check the Advanced box as per step 6. you should see the entries you have to modify in step 10.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Naufr4g0

  • Full Member
  • ***
  • Posts: 112
    • View Profile
SFGUI
« Reply #43 on: October 31, 2011, 09:30:01 pm »
Quote from: "binary1248"

"CMake Error at {SFML root directory}/cmake/Modules/FindSFML.cmake ..." is an expected error message after step 9. Proceed with step 10.

If you check the Advanced box as per step 6. you should see the entries you have to modify in step 10.


THANKS VEEEERYYYYYY MUCH!
I put all paths manually and I finally made it! :)
Now I can compile! :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFGUI
« Reply #44 on: October 31, 2011, 10:58:21 pm »
This is so complicated...

Even if you didn't install SFML, you just have to copy FindSFML.cmake to <cmake install>/share/cmake-2.8/Modules, then set the SFMLDIR variable to the root of the "include" and "lib" directories of SFML, and magically, "Configure" works the very first time you click it ;)

Even better: set it as an environment variable, and you don't even have to do it everytime you configure a CMake project that uses SFML.
Laurent Gomila - SFML developer