Author Topic: Premake-Generated-Project: Codeblocks creates binaries in the wrong directory!!!  (Read 3296 times)

Offline babaliaris

  • Single posting newcomer
  • *
  • Posts: 4
Hello! I created a project for codeblocks using Premake but when I build the project, codeblocks instead of generating the binaries inside bin/Debug(Release) , it creates them into the directory where premake4.lua exists.

If you don't know how premake works, can you tell me if codeblocks has a project setting which tells it where to build binaries for Debug or Release configurations? This might help me figure it out.

This is how the project tree looks like:

Premake Root/
     src/
     premake4.lua
     codeblocks/
          TestSolution.workspace
          Test/
                Test.cbp


Notice that the codeblocks directory and everything inside it are generated by premake.
     
     
This is my premake script:
Code
solution "TestSolution"
configurations {"Debug", "Release"}
location "codeblocks"

project "Test"
kind "ConsoleApp"
language "C++"
files {"**.cpp", "**.h"}
links {"GL", "glfw", "GLEW"}
includedirs {"/usr/local/include", "/usr/include", "src/headers"}
libdirs {"/usr/lib", "/usr/local/lib64"}
location "codeblocks/Test"



file = io.open("codeblocks/run.sh", "w");
file:write("export LIBGL_ALWAYS_SOFTWARE=1\n./bin/Debu/Test")
file:close()

As always, thank you   :)
« Last Edit: May 16, 2019, 02:15:15 pm by babaliaris »

Offline babaliaris

  • Single posting newcomer
  • *
  • Posts: 4
I found the solution targetdir