Do I have to build dependencies one by one? #2050
Replies: 1 comment
-
Hi, I assume you mean C/C++? Unfortunately C++ projects use different approaches for project configuration and building the code. If you want to use git submodule to include a dependency (a foreign code) then it will be your responsibility to prepare a Premake-Lua script to build it as a shared/static library and then link with your binary. Fortunately it is very easy thing to do with Premake. But to answer your question: yes, you have to build it one by one. I have a personal project that contains multiple git submodules, including: glm, imgui, raylib, spdlog, utfcpp, etc. Some of them are header-only libraries and some are compiled into static libraries. For the latter I have my own premake configurations and the source code of the libraries themselves remains unchanged. For example, my imgui configuration looks like this: project "imgui"
location ""
language "C++"
targetname "imgui"
kind "StaticLib"
warnings "Off"
files {
"imgui/*.h",
"imgui/*.cpp"
} Fairly simple, isn't it? If you want to use bigger and more complicated C/C++ libraries, like Boost, Skia, Bullet, SDL2, Allgro5, Qt, etc. with Premake then things might become more challenging. |
Beta Was this translation helpful? Give feedback.
-
Hello. Sorry if this's been asked before.
I'm using premake5 for my hobby project and I have a couple of dependencies as git submodules. I understand that premake doesn't build the created solution. But what if I have a lot of dependencies and want to keep them as submodules? Do I have to build them one by one or is there a better way?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions