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

Author Topic: Problem configuring csfml2 with cmake  (Read 37685 times)

0 Members and 2 Guests are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem configuring csfml2 with cmake
« Reply #30 on: February 10, 2012, 09:49:14 am »
Quote
Yes, I have all the sfml-*-2.dll files in "C:/dev/libs/SFML/bin" and all the libsfml-*.a (without the 2 suffix - is that correct?) files in "C:/dev/libs/SFML/lib"

Looks ok. In the CMake variables that you show above, which ones did you define, and which ones where automatically created by the configure step?

Quote
Ah, I misinterpreted this statement then: "You must have installed SFML 2 before, and if you did it successfully, the FindSFML.cmake file should have been copied to your CMake directory."

This was true before, but it has changed. Where did you read that?
Laurent Gomila - SFML developer

MelancholyMechanic

  • Newbie
  • *
  • Posts: 4
    • View Profile
Problem configuring csfml2 with cmake
« Reply #31 on: February 10, 2012, 10:34:53 am »
I got it to work now! The problem was, that I should have compiled SFML into a static library (see line 19 in the CSFML/src/SFML/CMakeLists.txt).

Thanks for your help!

Quote
Where did you read that?

You posted it here: http://www.sfml-dev.org/forum/viewtopic.php?p=31246#31246

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem configuring csfml2 with cmake
« Reply #32 on: February 10, 2012, 11:02:04 am »
Ah yes, sorry I totally forgot about that :)
Laurent Gomila - SFML developer

mscofield

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Problem configuring csfml2 with cmake
« Reply #33 on: April 02, 2013, 03:17:43 pm »
Hi, sorry for bumping.
Quote
Ah, I misinterpreted this statement then: "You must have installed SFML 2 before, and if you did it successfully, the FindSFML.cmake file should have been copied to your CMake directory."
This was true before, but it has changed. Where did you read that?

Right now, the .cmake files are installed in "/usr/local/share/SFML/cmake/Modules/" (instead of "/usr/share/cmake-X.Y/Modules/") and we have to move them manually , is this the intended way ?
If so, would be nice to mention it somewhere  ;)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problem configuring csfml2 with cmake
« Reply #34 on: April 02, 2013, 03:20:05 pm »
Quote
is this the intended way ?
Yes.

Quote
If so, would be nice to mention it somewhere
Done, 3 lines above ;D
Laurent Gomila - SFML developer

mscofield

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Problem configuring csfml2 with cmake
« Reply #35 on: April 02, 2013, 03:27:00 pm »
I meant somewhere during the installation process, since 100% of the people not familiar with cmake will need to know this.
Why not copy them automatically ?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problem configuring csfml2 with cmake
« Reply #36 on: April 02, 2013, 03:53:04 pm »
Quote
I meant somewhere during the installation process, since 100% of the people not familiar with cmake will need to know this.
It was just a joke ;)

Quote
Why not copy them automatically ?
Permission issues on Linux.
Laurent Gomila - SFML developer

mscofield

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Problem configuring csfml2 with cmake
« Reply #37 on: April 02, 2013, 04:55:00 pm »
Quote
I meant somewhere during the installation process, since 100% of the people not familiar with cmake will need to know this.
It was just a joke ;)
^^'

Quote
Why not copy them automatically ?
Permission issues on Linux.
Well the permissions on /usr/share and /usr/local/share are the same by default (755, ie need root to write), aren't they ?
« Last Edit: April 02, 2013, 04:57:13 pm by mscofield »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problem configuring csfml2 with cmake
« Reply #38 on: April 02, 2013, 06:53:51 pm »
You will always find someone with less permissions than the "default". Especially students in universities.

In the past, the SFML installation copied FindSFML.cmake to the CMake directory, like you suggested. And this was removed because of permission problems on Linux (real users reporting real problems) ;)
Laurent Gomila - SFML developer

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Problem configuring csfml2 with cmake
« Reply #39 on: April 02, 2013, 07:21:29 pm »
Quote
You will always find someone with less permissions than the "default". Especially students in universities.
I'd like to add that from my experience this is usually very very lost cause. ;D
« Last Edit: April 02, 2013, 07:25:30 pm by FRex »
Back to C++ gamedev with SFML in May 2023

mscofield

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Problem configuring csfml2 with cmake
« Reply #40 on: April 02, 2013, 07:52:35 pm »
Got it ;).

Shados

  • Newbie
  • *
  • Posts: 6
    • MSN Messenger - chaosshados@30gigs.com
    • AOL Instant Messenger - nazfellun
    • View Profile
    • ShadosNet
    • Email
Re: Problem configuring csfml2 with cmake
« Reply #41 on: May 30, 2013, 02:10:25 pm »
So, I gather from reading this thread that I should just be able to copy the FindSFML.cmake file to my cmake/Modules directory? Because when I do that and then run configure, I get:

CMake Error at C:/.../cmake-2.8.11-win32-x86/share/cmake-2.8/Modules/FindSFML.cmake:199 (message):
  Could NOT find SFML (missing: SFML_SYSTEM_LIBRARY SFML_WINDOW_LIBRARY
  SFML_NETWORK_LIBRARY SFML_GRAPHICS_LIBRARY SFML_AUDIO_LIBRARY)
Call Stack (most recent call first):
  src/SFML/CMakeLists.txt:27 (find_package)


Configuring incomplete, errors occurred!

Am I missing something here?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problem configuring csfml2 with cmake
« Reply #42 on: May 30, 2013, 02:17:16 pm »
Where is SFML? If not in a standard path, did you define the SFML_ROOT CMake variable?
Laurent Gomila - SFML developer

Shados

  • Newbie
  • *
  • Posts: 6
    • MSN Messenger - chaosshados@30gigs.com
    • AOL Instant Messenger - nazfellun
    • View Profile
    • ShadosNet
    • Email
Re: Problem configuring csfml2 with cmake
« Reply #43 on: May 30, 2013, 02:18:36 pm »
I let it install to the default path at C:\Program Files (x86)\SFML, I haven't set SFML_ROOT

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problem configuring csfml2 with cmake
« Reply #44 on: May 30, 2013, 02:52:20 pm »
Quote
I haven't set SFML_ROOT
You should. "C:\Program Files\SFML" is certainly not a standard path for your compiler ;)
Laurent Gomila - SFML developer