Questions tagged [premake]

Lua embedded build configuration and project generation tool

Filter by
Sorted by
Tagged with
0
votes
1answer
26 views

Premake5: GLFW project does not compile under project kind “ConsoleApp”

I have this strange problem where my GLFW project does not compile (I am using Mingw64 as my compiler) when I set the project kind to "ConsoleApp" in my Premake file. It works perfectly when ...
1
vote
0answers
23 views

Simple way to add a Premake subproject inside a CMake project?

I use CMake for my C++ projects and I like to have my dependencies as Git submodules inside a third-party folder so I can have easy access to the code and the possible CMake targets I can link with. . ...
1
vote
0answers
19 views

VisualD/Visual Studio Cannot Open Premake Generated .visualdproj

I've been trying out premake with D, and have found that Visual Studio cannot open the generated visualdproj files. Even the example given in the readme for the module does not work. However, a C ...
0
votes
0answers
5 views

premake and embedding custom console platforms

I need to add some custom console modules(embedding them) to premake could anyone tell me how they debug the lua scripts via possibly a debugger or some otherway? Thanks
0
votes
1answer
53 views

How to use googletest with premake5 and VS2019

I have been trying to integrate googletest into my solution, but I get either nasty linker errors or can't add it at all. googletest was added as a submodule: git submodule add 'https://github.com/...
0
votes
1answer
46 views

How to link OpenCV in CPP with Premake5

I'd like to link the 'OpenCV' library with a 'Premake5'. Since installing 'libopencv-dev' as 'apt install' on Ubuntu 18.04. I have written and executed a simple C++ program, but it does not work. How ...
0
votes
0answers
33 views

Make clean is not working when using premake5

I have a simple premake5 file that creates makefiles for a small project of mine. When I run premake5 gmake2 all makefiles are created successfully and I can call make to compile to an executable and ...
0
votes
1answer
75 views

premake5 How can I generate the projects relative to where the user call premake, and not relative to the premake5.lua file?

I want the workspace and project files generated relative to where the user call premake5, as right now, everything is relative to the premake5.lua location. I tried to use the location command in my ...
3
votes
0answers
84 views

Embedding lua into c++ but getting unresolved externals : floor, freopen & strcoll

I'm embedding lua into a c++ vs2019 solution and it results in linking errors to basic c libraries ( __imp_freopen, __imp_floor and __imp_strcoll ). lua compiles as a static c library in it's own ...
0
votes
1answer
403 views

Is there a way to make Premake use Visual-Studio Project templates?

I am trying to create a premake5.lua file for a Visual-Studio C# MonoGame project. I want to be able to make premake use the MonoGame project-template, instead of me having to manually dig through all ...
0
votes
0answers
66 views

c++ project alongside with c# build fails

If premake5 file contains only c++ project then c++ project builds. As soon as I add c# and regenerating with premake, c++ fails on build with error. Error says that c++ project has not reference to ....
0
votes
2answers
174 views

Exclude project from build by Premake

I have two projects in the solution. One of them is a debug lib, which should be built only in Debug workspace configuration. In VS I can just disable the 'Build' checkbox in Configuration Manager. ...
0
votes
0answers
133 views

Setting Environment Variables with Premake

I am making a premake script to set up an xcode vulkan project. I figured out everything but one thing. The vulkan docs, say I need to set environment variables for VK_ICD_FILENAMES, and ...
2
votes
1answer
105 views

what is PREMAKE error: Error: [string “src/base/api.lua”]:592: bad argument #2 to 'deferredjoin' (string expected, got table)?

So, I've started this new project and was writing my premake script, but generating it fails and generates this error: [string "src/base/api.lua"]:592: bad argument #2 to 'deferredjoin' (...
1
vote
1answer
132 views

Syntax of premake scripts

Can somebody explain to me what the syntax of a premake script means? A premake script is a valid lua script. Then what are solution, configurations, project in the below code? Variables? keywords? -- ...
0
votes
1answer
166 views

How to use premake with a vs2017 Qt project?

I have a Qt project with Visual Studio 2017. I tried to generate project files with premake and used the premake5.lua file from this page "https://wiki.qt.io/Premake_Project_Manager". this file uses a ...
0
votes
1answer
70 views

Building libraries using Premake5 without separate project files for each build

I have a large project and it takes quite a lot of time to compile the whole thing. A small change in a header file will result in building the whole project again even though it doesn't affect most ...
0
votes
1answer
329 views

Premake, command line options don't do anything

I have the following section in my lua script: newoption { trigger = "build-tests", description = "Build tests." } configuration "build-tests" print("bbbbbbbbb") include("Src/...
0
votes
0answers
104 views

Cannot open source file SFML/Graphics.hpp when including a header from a different project

The project all together is a game engine. However, for this aspect I am trying to add a development tool that uses SFML to display a graph. I have successfully linked SFML to get it working on its ...
0
votes
2answers
253 views

I cannot compile a C++ library using cmath on macOS 10.15.4 with premake5/gmake

I've spent several hours attempting to find out as to why I cannot compile my application that uses spdlog due to several errors related to cmath having no member in its global namespace: In file ...
0
votes
1answer
45 views

Premake5 compiling additional executables

I am a bit stuck with premake atm. I want to add multiple test files, that, well, run tests. These executables are completely independent from each other and from the main.cpp file that actually ...
0
votes
1answer
206 views

Using premake with google test

I`m trying to implement premake to my first solution, all projects build fine except my googleTest project in Visual Studio 19 when I enter the test properties there is an additional property - "...
0
votes
1answer
159 views

premake5: add files to “Copy Bundle Resources” build phase

I have some image files I need to add to an Xcode project. I need the files to be included in the Copy Bundle Resources build phase. I also need Type to be set to Data to avoid any compression or ...
0
votes
1answer
119 views

Premake exclude project

I have a main premake lua file in root with the workspace declaration and some basic configurations and at the end of that file I include the projects. workspace "Test" CONFIGURATIONS ...
1
vote
1answer
221 views

Premake5 specify platform at command line?

I have a list of platforms in my premake5.lua file like this: platforms { "windows", "macos", "ios" } How do specify the platform when invoking premake? This doesn't work: premake5 xcode4 --...
0
votes
1answer
223 views

Add additional options in Properties->C/C++->Command Line using Premake

I need to add "/FS" to Properties->C/C++->Command Line->Additional Options. My (shortened) premake.lua: workspace "test_refactor_edit_control_01" platforms { "Win32", "64" } configurations { ...
3
votes
1answer
204 views

I cannot add additional libraries with premake5

I am learning OpenGL and GLFW, and I decided to use premake5, because it seems easy to use and maintain. My project is located in a folder called LearningOpenGL. I am on MAC. Project structure. ...
0
votes
1answer
136 views

Premake command line option to include a project

So I have a Premake5 script to generate makefiles for my current project (a static library). It has a command line option called "with-sandbox". "sandbox" is a testing environment for the library. But ...
0
votes
1answer
299 views

Building project with Premake5 doesn't generate executables or intermediates

I recently watched this video and decided to include a premake build step in my project. However, after seemingly implementing the code in my .lua file identically (apart from the names), premake ...
0
votes
1answer
134 views

Have Premake generate a vcxproj file that refers to an existing .props file

I am using a third party SDK that supplies a .props file that is used in the visual studio projects. I generate my .vcxproj file with Premake, as opposed to using the SDK's project wizard. How can I ...
0
votes
1answer
45 views

How to add a custom line in .vcxproj file using premake?

I'm trying to add a custom line in .vcxproj file, generated with premake5. My team is using an old version of premake5 so some of the options are not available(such as debuggertype, compileas , ...
0
votes
0answers
62 views

Vulkan.hpp compiling on one system but not another

I have the following generic function: template <typename U> auto CastVkArray(std::vector<U> &unique_handles) { std::vector<typename U::element_type> handles; for(...
0
votes
2answers
489 views

Transitive library dependency in Premake?

I have a problem with linking libraries correctly to my projects using gmake and premake5 (On Linux, elementaryOS). I'm using premake to generate the makefiles. I have 3 projects in my workspace: glfw ...
0
votes
1answer
50 views

How to adding a flags config just for specific files in Premake?

I want to add flags "XXX" just only for some specific files I could end up using the filter but I must creat each filter for each file, it is not comfortable. The reason I must separate each filter ...
2
votes
1answer
85 views

Can Premake package a project?

I have a Premake 5 project that builds a static library (primarily via the gmake2 or vs2017 actions). I'd like to create a build target for the release material itself: the library zipped up with some ...
1
vote
1answer
176 views

gcc auto link shared libraries needed by static libraries

I've installed the Nana library and I've read from their website that the library needs some shared libraries to work.. So during linking (gcc) i need to put all links (-lXft, -l...). Is there a ...
0
votes
1answer
185 views

Dr Memory with Premake5 : How to specify Debug Information

I want to use Dr. Memory on my Visual Studio 2019 project. Dr. Memory has a page on how to prepare your application properly to use Dr. Memory: http://drmemory.org/docs/page_prep.html I know how to ...
0
votes
1answer
313 views

Compiler can't find SFML/Graphics.hpp, but it is added to includedirs

I have started working on a game engine of which you can find the source code at https://github.com/SapphireOmega/MarbleEngine. I set my project up using premake5. I tried to use sfml, but on both ...
2
votes
0answers
324 views

Is there a different way to copy the .dll file from one project to beside my executable file in my startup project?

I'm using premake5 to build a c++ visual studio 2019 application engine. I need to figure out why it's not working after I used premake5 to build my projects. I have tried to change the architecture ...
0
votes
1answer
304 views

Premake override for Vcpkg

I would like to be able to create a custom override to add a VcpkgConfiguration Property based on our current configuration. We have a C++ project that uses Premake and vcpkg. We have found vcpkg to ...
0
votes
2answers
186 views

Premake (lua) pch create /Yc Visual Studio

In the premake lua script for my solution. How do i set it to create "/Yc" the phc instead of being set to use "/Yu" on first initialisation. I have searched the online documentation and tried other ...
2
votes
1answer
697 views

How to copy all headers from a C++ project with premake

I have a C++ project with its source files (.cpp and .h files) in a directory called src and its subdirectories. I want, once my project is compiled, to copy all the header files from this source ...
2
votes
2answers
351 views

How do I add global properties to generated Visual Studio projects and solutions via premake5?

I would like to add two conditional properties to my project configuration to target a non-default vcpkg triplet: https://github.com/microsoft/vcpkg/blob/master/docs/users/integration.md#with-msbuild ...
1
vote
1answer
330 views

Removing a premake configuration when compatible toolset is not used

I'm using premake5 as project generator. I'm using it to generate makefile or Visual Studio where needed (Linux and Windows respectively). I want to have a SAN (Adress/Undefined-Behavior SANitizer) ...
0
votes
1answer
78 views

Can I print the final assembled gcc command with premake?

I have a premake compilation script. This script generates a make file which can then be used to compile the final exectuable. I want to instruct premake to instruct the make file to display the ...
0
votes
1answer
573 views

Premake linkingLinking into SharedLib not working

I am currently trying to learn C++ and thought doing some OpenGL magic would be a nice idea. I saw a Premake5 tutorial and followed along, except I tried linking a library myself (GLFW). When ...
2
votes
1answer
754 views

Premake5: How to build HLSL shaders?

I'm struggling to figure out how to set up my hlsl shaders to work with Premake5 and Visual Studio 2017. I have no idea how to tell Premake5 to compile my hlsl shaders, as a pre-build step. Here ...
0
votes
2answers
364 views

DirectX12 with Premake5: Linking Directx12 Static Libraries

I'm switching to using a premake5 instead of just directly working with Visual Studio 2017. However, I'm having trouble linking against the appropriate dx12 libraries Here is how I linked against ...
0
votes
2answers
312 views

Adding a c++ executable icon to premake5 build script

can someone confirm if and how can I add an C++ aplication icon in a premake5.lua script? The icon property seems to work just for C#. I got an .ico format icon prepared, I just can't find a way how ...
1
vote
2answers
564 views

Can Premake propagate includedirs to dependency projects?

I have a project that's roughly structured as: main.c premake5.lua moduleA/ premake5.lua include/modulea.h src/modulea.c moduleB/ premake5.lua include/moduleb.h src/moduleb.c My top ...