⚠️ Windows is not supported for now!!
This tool makes it easy to use both CMake and Premake projects by converting CMakeLists.txt files into Premake5.lua files. With this converter, we can use libraries that have a CMake build system in our Premake project.
local cmake_premake = require "path.to.repo.cmake_premake"
.cmake_premake.include_proj(/path/to/cmake_project)
below where you define the workspace.include 'exported-project-name.lua'
at the end of the premake file-- Include the CMake converter module
local cmake_premake = require "path.to.repo.cmake_premake"
-- Define the workspace
workspace "MyWorkspace"
configurations { "Debug", "Release" }
platforms { "x86", "x64" }
-- Add more configurations and platforms as needed
-- Include the CMake project
cmake_premake.include_proj("/path/to/cmake_project")
-- Define your own projects and settings below
project "MyProject"
kind "ConsoleApp"
language "C++"
files { "**.cpp", "**.h" }
-- Additional project settings...
-- Example additional settings and configurations
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
-- including this afer conversion
include "cmake_project.lua"
We welcome any and all contributions! Here are some ways you can get started: