GabrieleGiuseppini / Floating-Sandbox

Mass-spring network in C++, simulating physical bodies floating in water and sinking
Other
58 stars 30 forks source link

CMake User Area Not Dynamic #82

Closed linux649 closed 1 year ago

linux649 commented 1 year ago

When I starting building i saw an error with not found dependencies. I checked your cmake file for linux and saw that you left your absolute path and not making it dynamic. I think you should change your first part of the linux cmake to this:

# Enable static linking
set(FS_USE_STATIC_LIBS ON)

# Define dependency locations
set(SDK_ROOT "${HOME}/fs_libs")
set(REPOS_ROOT "${HOME}/git")

to make it dynamic and usable by just executing the cmake without editing it.

GabrieleGiuseppini commented 1 year ago

Hi, actually Floating Sandbox does NOT come with a CMake for Linux. The user is supposed to copy the provided example "user settings" CMake file (UserSettings.example-linux.cmake), rename it to "UserSettings.cmake", and edit it according to their environment.

Doing this allows for maximum flexibility; allowing one to have a custom "HOME" variable would never work, as not all relative paths can be assumed to be under the same root folder.