Open erikmartinessanches opened 6 months ago
Can you confirm that you are indeed using v6? It is far from ready and should not be used.
Can you confirm that you are indeed using v6? It is far from ready and should not be used.
By bad, it’s indeed 5.0.0-dev!
Do the other libraries show up as expected?
The other libraries do not appear in ‘Frameworks and Libraries”, only the frameworks ending in .framework
appear.
Okay, good info to know. I don't have access to any apple devices, so I won't be able to triage this myself, but hopefully one of the other devs with access to one will be able to get you a fix.
For info, posted on stackoverflow
There was a typo in my glfw
in my OP!
I have now managed to generate an xcode project that has libvulkan.1.dylib
(along with files ending in .framework) listed in “Frameworks and Libraries” with this updated premake5.lua
file.
workspace "Vulkan2"
configurations { "Debug", "Release" }
architecture "ARM64"
location "./"
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "Vulkan2"
kind "ConsoleApp"
language "C++"
targetdir ("bin/" .. outputdir .. "/%{prj.name}/")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}/")
staticruntime "On"
cppdialect "C++17"
files { "src/**.h", "src/**.hpp", "src/**.cpp" }
includedirs{"%{prj.location}/vendor/vcpkg-installed/" .. "arm64-osx" .. "/include"}
externalincludedirs{"%{prj.location}/vendor/vcpkg-installed/" .. "arm64-osx" .. "/include"}
xcodebuildsettings = {["HEADER_SEARCH_PATHS"] = { "%{prj.location}/vendor/vcpkg-installed/" .. "arm64-osx" .. "/include/" }}
libdirs {"%{prj.location}/vendor/vcpkg-installed/" .. "arm64-osx" .. "/lib/"}
links {"spdlog", "glfw3", "libvulkan.1.dylib", "Cocoa.framework", "IOKit.framework", "fmt"}
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
I suppose it’s not intended for spdlog, glfw3 and fmt (all .a files) to appear in “Frameworks and Libraries”, since if I add them, it says it ignores duplicates. I guess only frameworks and dynamic libraries go here.
However, when trying to add libvulkan.1.dylib
with with premake5.lua
as in this post, the error in the xcode project is
/Users/erik/Dev/Projects/Vulkan2/libvulkan.1.dylib /Users/erik/Dev/Projects/Vulkan2/libvulkan.1.dylib: No such file or directory
Note that it's looking in the wrong location for the libvulkan.1.dylib
. libvulkan.1.dylib
is in fact located in %{prj.location}/vendor/vcpkg-installed/" .. "arm64-osx" .. "/lib/
.
Is there any was to tell links{}
where the libvulkan.1.dylib
is located? (How do I generally add a dynamic library?)
Just added sample project to test "external" links. It compiles with xcode4 (on CI, I don't have MacOS). It is possible though that you cannot see the libraries where you expect in the project (check also in extra link options for example)(that happens also for visual studio for some options).
Is there any was to tell
links{}
where the libvulkan.1.dylib is located?
Not to only one library, but there is libdirs
to add to search path.
What seems to be the problem? Libraries (such as spdlog, glfw3) linked in the
links{}
section do not show up in the xcode project property’s "Frameworks and Libraries" section. Only frameworks such as Cocoa.framework and IOKit.framework appear.What did you expect to happen? I expect the library to appear in the generated xcode project properties -> Target -> General -> Framework and Libraries.
What have you tried so far? See the steps below.
How can we reproduce this?
git submodule add -f https://github.com/Microsoft/vcpkg.git ./vendor/packages
./vendor/packages/bootstrap-vcpkg.sh
{ "dependencies": ["spdlog", "glfw3", "vulkan", "glm"] }
./vendor/packages/vcpkg install --x-install-root=vendor/vcpkg-installed
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "Vulkan2" kind "ConsoleApp" language "C++" targetdir ("bin/" .. outputdir .. "/%{prj.name}/") objdir ("bin-int/" .. outputdir .. "/%{prj.name}/") staticruntime "On" cppdialect "C++17" files { "src/.h", "src/.cpp"}
includedirs{"vendor/vcpkg-installed/" .. "arm64-osx" .. "/include/"} externalincludedirs{"vendor/vcpkg-installed/" .. "arm64-osx" .. "/include/"}
xcodebuildsettings = { ["HEADER_SEARCH_PATHS"] = { "vendor/vcpkg-installed/" .. "arm64-osx" .. "/include/*"}} libdirs {"vendor/vcpkg-installed/" .. "arm64-osx" .. "/lib/"} links {"spdlog", "glwf3", "vulkan", "Cocoa.framework", "IOKit.framework", "fmt"}
filter "configurations:Debug" defines { "DEBUG" } symbols "On"
filter "configurations:Release" defines { "NDEBUG" } optimize "On"