Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I link with a non platform .framework? (that is not in the systems framework folder) #175

Open
pjako opened this issue Feb 27, 2018 · 6 comments

Comments

@pjako
Copy link

pjako commented Feb 27, 2018

I tried to add the Vulkan .framework file from https://vulkan.lunarg.com/sdk/home to a fips project.
I just put the file in the fips project root and tried to use it with
fips_frameworks_osx(vulkan)
but that did not work, I guess that macro does not search in the project root.

@floooh
Copy link
Owner

floooh commented Feb 27, 2018

I haven't tried it with OSX frameworks yet, but fips defines a set of standard directories where it searches for link libraries both in the main project and dependencies with the naming convention
[proj]/lib/[platformname].

So you could try putting the Vulkan framework file into [proj]/lib/osx and see if cmake picks it up.

This is where the linker search path setup happens:

@pjako
Copy link
Author

pjako commented Feb 27, 2018

Tried to put the framework here:
[project]/libs/osx/vulkan.framework
did not works unfortunately

@floooh
Copy link
Owner

floooh commented Feb 27, 2018

The name should be 'lib' not 'libs' (I know it should be 'libs')

@pjako
Copy link
Author

pjako commented Feb 27, 2018

ups... well tried it now with 'lib' still does not work
using..
fips_frameworks_osx(vulkan)
./fips gen
...
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
...

@floooh
Copy link
Owner

floooh commented Feb 27, 2018

hmm the reason is probably that it's doing a find_library() here:

foreach (fw ${CurFrameworks})
, I think this was necessary to make linking against system frameworks work.

Another thing you could try is simply a fips_libs(vulkan.framework), this does the same as fips_frameworks_osx() but without the find_library() call...

@pjako
Copy link
Author

pjako commented Feb 28, 2018

Now it does not work silently using (no error from ./fips gen)
fips_libs(vulkan.framework)

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

No branches or pull requests

2 participants