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

Author Topic: CMake tutorial added  (Read 7852 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
CMake tutorial added
« on: October 30, 2010, 12:10:25 am »
Laurent Gomila - SFML developer

ekun

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Vagante
    • Email
CMake tutorial added
« Reply #1 on: October 30, 2010, 04:16:32 am »
Nice tutorial!

I understand much better now what CMake is. This seems like a great tool for cross-platform development.
@ekunenuke

Xorlium

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
CMake tutorial added
« Reply #2 on: October 30, 2010, 10:29:18 am »
Yeah, nice job Laurent!

For some feedback: I think that maybe add a little about how to make a project with cmake that uses sfml, and how to use FindSFML.cmake.

I kind of already know how to do that, but it would be helpful for others maybe, and it took me a while to realize how to do it.

Xorlium

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
CMake tutorial added
« Reply #3 on: October 30, 2010, 10:35:38 am »
Quote
For some feedback: I think that maybe add a little about how to make a project with cmake that uses sfml, and how to use FindSFML.cmake.

You're right. However I don't know if it should be explained in this tutorial, or in a separate one, similar to the tutorials that already exist for other build systems (Visual Studio, Code::Blocks, Linux makefiles, ...).
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
CMake tutorial added
« Reply #4 on: October 30, 2010, 11:17:26 am »
Quote
It is similar to SCons, autoconf/automake or premake

The comparison with SCons is not quite right. CMake generates build files for the target platform, SCons is a make tool (just like make, for example). SCons can be extended by custom builders that create MSVC solutions (or for other IDEs), but I think it doesn't make SCons become a meta build system.

Besides of that, nice tutorial. :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
CMake tutorial added
« Reply #5 on: October 30, 2010, 11:28:50 am »
Oh, ok. I'll remove it to avoid confusion.
Laurent Gomila - SFML developer

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
CMake tutorial added
« Reply #6 on: October 30, 2010, 11:40:22 am »
Hey Laurent, just a little question :

How can you permanently stock the compiler variables (C_COMPILER and CXX_COMPILER or something like that) :
I've recently upgraded from Windows Vista to Seven and I don't remember how I had done (and cannot found it with google and Cmake FAQ).
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

Thiziri

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
CMake tutorial added
« Reply #7 on: October 30, 2010, 12:03:31 pm »
sorry I did a mistake :D

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
CMake tutorial added
« Reply #8 on: October 30, 2010, 12:04:34 pm »
Don't do that. If you want to use always the same compiler, put it in the PATH environment variable permanently. But don't force CMake to always use the same compiler environment.

Quote
Windows + Pause > System advanced settings > Environment variables > System variables > New

Are you sure that CMake variables can be set as environment variables?
Laurent Gomila - SFML developer

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
CMake tutorial added
« Reply #9 on: October 30, 2010, 01:44:09 pm »
Okay, thank you Laurent  :)
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
CMake tutorial added
« Reply #10 on: October 30, 2010, 05:26:47 pm »
Great job!  :wink:

It's very useful and interesting. Thanks a lot!
SFML / OS X developer

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
CMake tutorial added
« Reply #11 on: October 30, 2010, 10:13:50 pm »
Seems useful, nice job.

You should add the standard Linux procedure in a short text, in my opinion:
Code: [Select]
mkdir build
cd build
cmake ..
make


Adding another tutorial for project setup with FindSFML and CMake in general would be a good idea as well.

seo services w

  • Newbie
  • *
  • Posts: 1
    • View Profile
CMake tutorial added
« Reply #12 on: October 31, 2010, 09:18:45 am »
Thansk for sharing it I think its a great tool for cross-platform development and its very useful for us.