premake / premake/premake-core
XCode does not show linked Libraries
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 654
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 13
Description
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?
- Install vcpkg for dependency management into vendor/packages:
git submodule add -f https://github.com/Microsoft/vcpkg.git ./vendor/packages - Bootstrap vcpkg
./vendor/packages/bootstrap-vcpkg.sh - Create or edit vcpkg.json to contain
{ "dependencies": ["spdlog", "glfw3", "vulkan", "glm"] } - Install dependencies into vendor/vcpkg-installed
./vendor/packages/vcpkg install --x-install-root=vendor/vcpkg-installed - Create a premake5.lua:
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/**.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"
- Generate xcode project
./vendor/bin/premake/premake5 xcode4
- Visual Studio 2022 (vs2022)
- Visual Studio 2019 (vs2019)
- Visual Studio 2017 (vs2017)
- Visual Studio 2015 (vs2015)
- Visual Studio 2012 (vs2012)
- Visual Studio 2010 (vs2010)
- Visual Studio 2008 (vs2008)
- Visual Studio 2005 (vs2005)
- GNU Makefile (gmake)
- GNU Makefile 2 (gmake2)
- XCode (xcode)
- Codelite
- Other (Please list below)
What version of Premake are you using?
5.0.0-dev
Other details
Apple Silicon M1 Macbook Pro.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the supplied premake5.lua and the premake5 xcode4 command, then compare the generated Xcode target with the entries in links{}. Done means linked libraries such as spdlog, glfw3, vulkan, and fmt appear in the target's Frameworks and Libraries section, alongside the existing frameworks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, lua
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100