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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Limeoats

Pages: [1]
1
General / Re: Trouble installing SFML 2.5.1 on Mac for CLion/CMake
« on: December 31, 2018, 11:23:07 pm »
The config files are there, but they seem a bit hidden: Frameworks\SFML.framework\Versions\2.5.1\Resources\CMake\

When I build CSFML on macOS a few weeks ago, I had trouble using them, but I'm not sure if it was just be being bad with macOS, whether CSFML needs some changes or if there's indeed some issue with them.
Let me know if they worked for you. :)

Thank you, that was helpful and I was actually able to get it working with this information. I had to make a few tweaks though. I may just be doing something wrong / unnecessary, but this worked for me.

I put the whole folder I downloaded into ~/Library/Frameworks, and I had to set the SFML_DIR variable as you mentioned in your other post about upgrading:

set(SFML_DIR "~/Library/Frameworks/SFML/Frameworks/SFML.framework/Versions/2.5.1/Resources/CMake")

Once I did this, the SFMLConfig.cmake was found but the relative paths were still messed up a bit. I was able to fix them by going into SFMLSharedTargets.cmake and adding the following line two more times:

get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)

in the section called
# Compute the installation prefix relative to this file.

This modified the relative path to be correct based on filesystem. I'm not sure if this is a bug or just the way I set everything up, but hopefully this can help others experiencing similar issues.

Thanks again for pointing me in the right direction!


2
General / Trouble installing SFML 2.5.1 on Mac for CLion/CMake
« on: December 28, 2018, 09:55:25 pm »
I'm having trouble installing SFML 2.5.1 on my Mac to use with CLion / CMake. I downloaded it from the Downloads page but noticed that it does not contain the new SFMLConfig.cmake. I tried moving the downloaded folder into my /Library/Frameworks folder and adding the SFMLConfig.cmake manually, but that did not work.

I should also point out that I checked the tutorials and none of them mention the SFMLConfig.cmake, so I wasn't able to get any help there.

I can probably make it work fine with a FindSFML.cmake file, but I'd rather get it working the correct way since FindSFML.cmake is deprecated. Why is SFMLConfig.cmake missing?

3
Graphics / Re: Texture saved in Ram
« on: June 28, 2016, 04:05:38 pm »
Hey, is it possible to keep a loaded texture saved in the RAM?
I created a global class/object and tried to save the texture in it.
But if it doesnt work, if i leave the main function...

Is there a way to keep the texture in the RAM?

Leaving the main function ends your program, and all resources related to your program are released. This means that even if you have a global class that stores a texture, its memory will be freed and will no longer have your texture once you leave main.

I don't see the benefit of saving a texture in some kind of database. You should just load them each time the program starts.

4
General / Re: [CMake]Could NOT find SFML
« on: June 28, 2016, 03:29:23 pm »
You shouldn't need to use COMPONENTS. I simply have this for the SFML code in my CMakeLists.txt

Quote
include(FindPkgConfig)
find_package(SFML REQUIRED system window graphics network audio)
include_directories(${SFML_INCLUDE_DIR})
if(WIN32)
    target_link_libraries(${PROJECT_NAME} ${SFML_LIBRARIES} -lmingw32 -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid)
else()
    target_link_libraries(${PROJECT_NAME} ${SFML_LIBRARIES}  )
endif()

This works on both Windows and Mac.

Of course, you need FindSFML.cmake to use this, but I assume you already are since it seems to be including fine (just the linking is the problem).

Pages: [1]