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

Author Topic: SFML 2 for OS X comes true!  (Read 104176 times)

0 Members and 2 Guests are viewing this topic.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #210 on: January 01, 2012, 08:20:02 pm »
Including SFML as a subdirectory works but I also want to give some parameters to the SFML's CMake file. Here I want to build frameworks instead of dynamic libraries for example, without modifying the CMake file.
Want to play movies in your SFML application? Check out sfeMovie!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 2 for OS X comes true!
« Reply #211 on: January 01, 2012, 08:24:14 pm »
Have you tried a simple variable assignment?
Code: [Select]
set(BUILD_FRAMEWORKS 1)
include(deps/SFML)

:?:
Laurent Gomila - SFML developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #212 on: January 01, 2012, 08:32:56 pm »
I suppose you meant add_subdirectory() instead of include().

Yes I had tried that (and tried again right now) and it doesn't work. It's still building SFML dynamic libraries instead of frameworks.
Want to play movies in your SFML application? Check out sfeMovie!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 2 for OS X comes true!
« Reply #213 on: January 01, 2012, 10:51:31 pm »
Quote
I suppose you meant add_subdirectory() instead of include().

Oops, yes.

Quote
Yes I had tried that (and tried again right now) and it doesn't work. It's still building SFML dynamic libraries instead of frameworks.

I pushed an improved CMakeLists.txt, can you test again?
Laurent Gomila - SFML developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #214 on: January 02, 2012, 01:28:04 am »
Now it does work when setting BUILD_FRAMEWORKS before add_subdirectory() :D . Thanks you very very much :D .

Just a little note: I got the following message when running CMake:
Code: [Select]
CMake Error at deps/SFML/CMakeLists.txt:9 (set):
  set given invalid arguments for CACHE mode.
Call Stack (most recent call first):
  deps/SFML/CMakeLists.txt:91 (sfml_set_option)
Want to play movies in your SFML application? Check out sfeMovie!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 2 for OS X comes true!
« Reply #215 on: January 02, 2012, 08:01:21 am »
Quote
I got the following message when running CMake

Hmm, is it because of the line break in the middle of the function call?
Laurent Gomila - SFML developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #216 on: January 02, 2012, 02:37:29 pm »
Nop.
Want to play movies in your SFML application? Check out sfeMovie!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 2 for OS X comes true!
« Reply #217 on: January 03, 2012, 12:37:52 pm »
Warning fixed.
Laurent Gomila - SFML developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #218 on: January 07, 2012, 03:40:16 pm »
Why does the SFML's CMake script copies SFML.framework directly into the SFML directory rather than in SFML/lib like for the other frameworks ?
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML 2 for OS X comes true!
« Reply #219 on: January 07, 2012, 03:41:24 pm »
I've got no idea. I was wondering the same thing the other day but couldn't find any explanation. =/
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #220 on: January 07, 2012, 04:02:22 pm »
We'd need to find out why the other frameworks are being copied into lib, and thus what's missing for the SFML framework. I can't find where this is set for now.
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML 2 for OS X comes true!
« Reply #221 on: January 07, 2012, 04:04:48 pm »
Is that really important ? I mean.. it's installed correctly, so it doesn't matter where it is build, right ?
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #222 on: January 07, 2012, 04:08:53 pm »
If you do the install step yes. But beyond the install step, I'm trying to gather every frameworks my library depends on in a single directory. It'd be better if I hadn't to look for the SFML frameworks in different places.


Edit: and yeah I could just copy SFML.framework from the main directory but I don't know whether this behavior'll be fixed. I'd be pleased if I hadn't to fix my automated scripts.
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML 2 for OS X comes true!
« Reply #223 on: January 07, 2012, 04:12:37 pm »
You don't need to link against SFML.framework. (You can but you're not forced to.) So you could remove this dependency.

However, finding out why this appends would be cool.  :)
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #224 on: January 07, 2012, 04:27:19 pm »
Well it isn't really a matter of linking, but rather about a clean and convenient structure. I gather all of the SFML frameworks in one single place so that the user knows where to find my framework and all of its dependencies (including headers). Then he does whatever he wants with these. He's not forced to do the cmake install step.
Want to play movies in your SFML application? Check out sfeMovie!

 

anything