How do I link with a non platform .framework? (that is not in the systems framework folder)
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.
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:
- for the main project: https://github.com/floooh/fips/blob/e4abb256caf23a48a37d1e418b2130f609540c0c/cmake/fips_private.cmake#L40
- for dependencies the standard locations are generated here: https://github.com/floooh/fips/blob/e4abb256caf23a48a37d1e418b2130f609540c0c/mod/dep.py#L348
- you can also export your own library search paths in the fips.yml file (for dependencies): https://github.com/floooh/fips/blob/e4abb256caf23a48a37d1e418b2130f609540c0c/mod/dep.py#L360
- and finally the lowest-level way to do it is directly via cmake, for instance here in the oryol fips-include.cmake: https://github.com/floooh/oryol/blob/2f8ea56c8c6611f92bce8871f3ac7de4eb887b3a/fips-include.cmake#L167
Tried to put the framework here: [project]/libs/osx/vulkan.framework did not works unfortunately
The name should be 'lib' not 'libs' (I know it should be 'libs')
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. ...
hmm the reason is probably that it's doing a find_library() here: https://github.com/floooh/fips/blob/e4abb256caf23a48a37d1e418b2130f609540c0c/cmake/fips_private.cmake#L64, 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...
Now it does not work silently using (no error from ./fips gen) fips_libs(vulkan.framework)