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

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

0 Members and 1 Guest are viewing this topic.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML 2 for OS X comes true!
« Reply #195 on: October 18, 2011, 10:00:55 pm »
It's something very stupid with this GUI... You have to click twice on configure (the first time to generate the cache and the second time to update it with your custom variable value, ie at ). Yeah....

BTW, love firefly too  :D
SFML / OS X developer

sbroadfoot90

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
SFML 2 for OS X comes true!
« Reply #196 on: October 18, 2011, 11:10:07 pm »
I think if the option has a red background, it means you should press configure again.

coral

  • Newbie
  • *
  • Posts: 37
    • View Profile
SFML 2 for OS X comes true!
« Reply #197 on: October 18, 2011, 11:14:27 pm »
That seemed to work better! Stupid GUI indeed.

Thanks for the help!

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #198 on: November 01, 2011, 05:52:42 pm »
Hello,

I've just been noticing one thing after having done a fresh update and install from the Git repository: even if the sndfile binary (in the framework) has execution rights, when install via make install, the installed sndfile binary does no more have execution rights.

I was wondering whether this was normal. I'm not saying it's an issue because I didn't do any testing for now, but usually all libraries and executables have execution rights so...


Ceylo
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 #199 on: November 01, 2011, 06:26:21 pm »
This is indeed strange...

Does the copied framework still have the standard subfolder with symlinks ? Do applications still run fine or does this rights issue have an impact on them ?
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #200 on: November 01, 2011, 06:32:35 pm »
Yup the standard subfolders and symlinks are still there, the only missing thing is the execution right.

And testing the Sound sample works fine, and it indeed dynamically loaded the sndfile even without that right (I checked in the Activity Monitor app).

But if this right isn't needed, why all of the libraries are created with it?
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 #201 on: November 01, 2011, 11:17:42 pm »
I have no idea. Maybe a Unix expert can highlight us here ?
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #202 on: December 26, 2011, 11:04:42 am »
Is there a way to pass parameters to CMake subprojects ?

For example if I want to build frameworks by default instead of dylib? And keep the same architecture as the one I'm building for my own main project (and which isn't the default compiler architecture).




PS: Merry Christmas :)
Want to play movies in your SFML application? Check out sfeMovie!

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #203 on: December 31, 2011, 12:27:34 pm »
No way? :(

I've added SFML as a submodule of one of my projects but I want to use frameworks only, and a default cmake call will build dynamic libraries..
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 #204 on: December 31, 2011, 12:52:54 pm »
I'm not sure at all. here is my ideas :

- you may be able to use "cmake -D <var>:<type>=<value>" accordingly to cmake help manual. However I never used it so I don't know if it will work or not.

- you can run cmake to generate the default makefile. then you can use sed like this :
Code: [Select]
sed -i 's/BUILD_DOC:BOOL=FALSE/BUILD_DOC:BOOL=TRUE/g' CMakeCache.txt followed by make.

- If you're writing a cmake script you should be able to have the same behavior than with cmake -D with ExternalProject_Add and its CMAKE_CACHE_ARGS argument. (I never wrote cmake script that use external project so I may be completely wrong.)
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #205 on: December 31, 2011, 02:22:35 pm »
Quote from: "Hiura"
I'm not sure at all. here is my ideas :

- you may be able to use "cmake -D <var>:<type>=<value>" accordingly to cmake help manual. However I never used it so I don't know if it will work or not.

Doing this means I would also need to manually do the build step (calling make or any other command according to any OS and IDE..) as this won't include the SFML build in the project file generated for my library. And I would like everything to be included in this project.

Quote from: "Hiura"
- you can run cmake to generate the default makefile. then you can use sed like this :
Code: [Select]
sed -i 's/BUILD_DOC:BOOL=FALSE/BUILD_DOC:BOOL=TRUE/g' CMakeCache.txt followed by make.

Here the issue is sed is for Unix only. What about people running CMake-gui on Windows?

Quote from: "Hiura"

- If you're writing a cmake script you should be able to have the same behavior than with cmake -D with ExternalProject_Add and its CMAKE_CACHE_ARGS argument. (I never wrote cmake script that use external project so I may be completely wrong.)

Looks like the most promising solution but.. it'll unfortunately result in the following error:
Code: [Select]
loading initial cache file /Users/ceylo/Development/sfeMovie/deps/SFML/tmp/SFML-cache.cmake
CMake Error at CMakeLists.txt:3 (include):
  include could not find load file:

    /Users/ceylo/Development/sfeMovie/deps/SFML/src/SFML/cmake/Macros.cmake


CMake Error at System/CMakeLists.txt:76 (sfml_add_library):
  Unknown CMake command "sfml_add_library".

For some reason ${PROJECT_SOURCE_DIR} is incorrectly set to
/Users/ceylo/Development/sfeMovie/deps/SFML/src/SFML
instead of
/Users/ceylo/Development/sfeMovie/deps/SFML

For now I don't know why.
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 #206 on: January 01, 2012, 06:46:26 pm »
Sorry but I don't know the answer; I don't have enough experience with CMake. Maybe Laurent or someone else might be able to help you though.
SFML / OS X developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 2 for OS X comes true!
« Reply #207 on: January 01, 2012, 07:21:08 pm »
Quote
Maybe Laurent or someone else might be able to help you though

Yes... what's the problem? :lol:

Ok I've found it above, but I don't really understand what the problem is.
Laurent Gomila - SFML developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #208 on: January 01, 2012, 07:31:15 pm »
Quote from: "Hiura"
Sorry but I don't know the answer; I don't have enough experience with CMake. Maybe Laurent or someone else might be able to help you though.

I understand, and I actually wrote the post so that someone that would know more about CMake could answer.

Quote from: "Laurent"
Ok I've found it above, but I don't really understand what the problem is.

Well.. why is ${PROJECT_SOURCE_DIR} incorrectly set ? When running cmake independently to build SFML it's ok, but not when using the external project feature.

I've written the following to get SFML built with my library:
Code: [Select]
include(ExternalProject)
ExternalProject_Add(SFML
    PREFIX "deps/SFML"
    CMAKE_CACHE_ARGS -DBUILD_FRAMEWORKS:BOOL=TRUE)
Want to play movies in your SFML application? Check out sfeMovie!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 2 for OS X comes true!
« Reply #209 on: January 01, 2012, 08:16:54 pm »
I don't know anything about the "external project" feature of CMake. But you should be able to include SFML in your source tree as a simple sub-directory, you don't need fancy CMake stuff.
Laurent Gomila - SFML developer