Skip to content

Add CMake option to enable searching for DynLibs in an extra folder#373

Closed
hhyyrylainen wants to merge 2618 commits into
GameFoundry:masterfrom
hhyyrylainen:dynlib_subdir
Closed

Add CMake option to enable searching for DynLibs in an extra folder#373
hhyyrylainen wants to merge 2618 commits into
GameFoundry:masterfrom
hhyyrylainen:dynlib_subdir

Conversation

@hhyyrylainen
Copy link
Copy Markdown
Contributor

This adds an CMake option that when specifies enables the DynLib
loader to look for the library in an additional folder.

I was unable to fully test this as it seems that even though I have my
libs in a sub folder, it seems that just loading them by name
works. Maybe my RPATH setting comes into play here? This is at least
so on Linux.

BearishSun and others added 30 commits March 26, 2019 08:16
 - Escaped relevant characters from XML comments
 - Added nullptr init and comparison, creation methods, fixed casting
… GUI immediately, instead of having a one-frame delay
BearishSun and others added 24 commits July 5, 2019 09:52
- Added bs_convert_timet_to_string function for time to string conversion.
- Move all time-to-string functions in bs::Time to bs_convert_timet_to_string.
- Fix the time not being correctly written to the log output.
- Added the function to save the log as a text file.
- Modify the Debug::saveLog function to allow for setting the type of the log.
- Added a class to manage and get the string names of the categories.
- Register all found categories during the framework initialization.
- Log verbosity now has a toString function.
- Fix the documentation to match the logging system revamp.
- Fixed some other minor things.
- Move it to BsString and fixed code that used it.
- Port the code that used the old class to use a instance of the Log class in Debug.
- Fix the documentation to reflect the changes.
…d block size, as this is okay in some cases (e.g. mip-maps smaller than block size)
…ly handles rotations over 180 degrees

 - It no longer forces them to use the shorest path, causing them to wrap around
 - It was flipped on the Y axis
Also wraps the makro in do { ... } while(0) to make the compiler
complain about a missing semicolon after a BS_LOG invokation.
Also wraps the makro in do { ... } while(0) to make the compiler
complain about a missing semicolon after a BS_LOG invokation.
I was unable to fully test this as it seems that even though I have my
libs in a sub folder but it seems that just loading them by name
works. Maybe my RPATH setting comes into play here. At least on Linux.
@BearishSun
Copy link
Copy Markdown
Member

Hi. Can you provide a use-case for this functionality?

@hhyyrylainen
Copy link
Copy Markdown
Contributor Author

Not having to clutter the same folder as the executable with a bunch of libraries is nice. I coded this before I found out that at least on my computer the ld open lib function seems to take RPATH into account.

@BearishSun
Copy link
Copy Markdown
Member

Makes sense. Although I'd prefer this path is something we provide to DynLib from higher level systems when plugins are being loaded, rather than adding it under the hood. Not sure if it's required to be a build option? I'd prefer we add a path to START_UP_DESC which can then used in DynLib calls for plugins, as required.

@hhyyrylainen
Copy link
Copy Markdown
Contributor Author

I suppose it makes more sense to have this in the START_UP_DESC. I was in the mindset of adding cmake flags, as I'm going to next do a PR for adding flags for enabling RTTI and exceptions, and leaving debug info alone. So I just made this a flag as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.