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

Author Topic: FindSFML for CMAKE  (Read 44894 times)

0 Members and 1 Guest are viewing this topic.

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
FindSFML for CMAKE
« Reply #15 on: October 08, 2010, 12:37:49 am »
You should probably also add ${SFMLDIR}/lib/mingw to the FindSFML.cmake for the next "release".

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
FindSFML for CMAKE
« Reply #16 on: October 08, 2010, 08:07:27 am »
By the way, I added my own FindSFML.cmake to the repository for SFML 2.0.
Laurent Gomila - SFML developer

Osbios

  • Newbie
  • *
  • Posts: 23
    • View Profile
FindSFML for CMAKE
« Reply #17 on: October 27, 2010, 07:53:57 pm »
@Kolja:
Sorry for the late answer.

I never worked with OS X oe Mac, so I have no clue what the SFML_LIBRARY is supposed to look like. If you give me some more informations I can "try" to fix this.

What does the working SFML_LIBRARY looks like?

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
FindSFML for CMAKE
« Reply #18 on: November 17, 2010, 04:44:54 am »
Quote from: "Laurent"
By the way, I added my own FindSFML.cmake to the repository for SFML 2.0.


Ok I have the SVN repository of sfml 2 and I am going to go download Cmake. So what do I do with cmake, i am confused from the previous posts and I couldn't find that file in my sfml folder.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
FindSFML for CMAKE
« Reply #19 on: November 17, 2010, 07:51:43 am »
Quote
So what do I do with cmake

You read tutorials? ;)

Quote
I couldn't find that file in my sfml folder

It's under cmake/Modules. It automatically installs to the CMake folder when you install SFML.
Laurent Gomila - SFML developer

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
FindSFML for CMAKE
« Reply #20 on: November 18, 2010, 12:42:19 am »
Quote from: "Laurent"
Quote
So what do I do with cmake

You read tutorials? ;)

Quote
I couldn't find that file in my sfml folder

It's under cmake/Modules. It automatically installs to the CMake folder when you install SFML.


I did read the tutorials but I am really confused with all of this because my svn repository download has nothing that says sfml 2. so.......... Ya and what do you mean by instal sfml?

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
FindSFML for CMAKE
« Reply #21 on: November 18, 2010, 12:44:02 am »
I actaully have been in the trunk the whole time in the repository. SO lets see here. I open cmake and open the cmake file in there?

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
FindSFML for CMAKE
« Reply #22 on: November 18, 2010, 01:02:42 am »
Ok I have downloaded cmake and all i have is files. No exe or anything. I have tried running the vcvars32.bat and it opens and closes and doesn't let me type in cmake.. So what do i do??

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
FindSFML for CMAKE
« Reply #23 on: November 18, 2010, 07:16:54 am »
I have cmake and I have the repository and everything and I am following the tutorial as best as I can but generate doesnt't show up on cmake

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
FindSFML for CMAKE
« Reply #24 on: November 18, 2010, 08:07:09 am »
Quote
but generate doesnt't show up on cmake

What do you mean? The "Generate" button? Then you probably have errors (in the log area below the buttons).

PS: no need to quote the same message again and again in all your messages ;)
Laurent Gomila - SFML developer

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
FindSFML for CMAKE
« Reply #25 on: November 19, 2010, 02:57:15 am »
Quote from: "Laurent"
Quote
but generate doesnt't show up on cmake

What do you mean? The "Generate" button? Then you probably have errors (in the log area below the buttons).

PS: no need to quote the same message again and again in all your messages ;)


ok now i got the files and everything and i put the libs in the linker of vc++.Then when I run a simple program to open a window, it says, sfml-window-d-2.dll is missing from your computer, and it's not! I made a solution with cmake then compiled everything in vc++ and put all the libs and include diretories in their correct place. ANd in the linker and vc++ directories area in vc++ 2010 i added the correct folders to the lib and executable directories and the include directories in there on the right debug or realease options. An din the linker input i inlcuded all the sfml-window-d.lib files and such for the release and debug but it still doesn't work. HELP!?!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
FindSFML for CMAKE
« Reply #26 on: November 19, 2010, 08:01:29 am »
This has nothing to do with compiler or linker setup, these two steps complete successfully.

Now your executable needs to access the SFML DLLs to execute the functions they contain, so the DLLs must be in a known path when you run it. And known paths are the executable path, plus everything which is listed in the PATH environment variable.

And if you don't want to be bothered with DLLs, you can also choose to build SFML static libraries.
Laurent Gomila - SFML developer

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
FindSFML for CMAKE
« Reply #27 on: November 19, 2010, 04:21:45 pm »
Quote from: "Laurent"
This has nothing to do with compiler or linker setup, these two steps complete successfully.

Now your executable needs to access the SFML DLLs to execute the functions they contain, so the DLLs must be in a known path when you run it. And known paths are the executable path, plus everything which is listed in the PATH environment variable.

And if you don't want to be bothered with DLLs, you can also choose to build SFML static libraries.


Ok well i did intclude the executable path and such in vc++ 2010 but i guess i will just build statically. How do i do that?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
FindSFML for CMAKE
« Reply #28 on: November 19, 2010, 04:22:30 pm »
Quote
i guess i will just build statically. How do i do that?

It is explained in the CMake tutorial.
Laurent Gomila - SFML developer

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
FindSFML for CMAKE
« Reply #29 on: November 20, 2010, 03:38:39 am »
Quote from: "Laurent"
Quote
i guess i will just build statically. How do i do that?

It is explained in the CMake tutorial.


Ok in cmake I changed the build type to static and added static and in the options area i added it too. Then i compiled the sfml thing in vc++ statically and then i included that library as my release option and it still said my dll is missing.