Topic: Premake template for plugins
-----------------------------------------------------------------------------------------------------------------------------
-- Maratis plugin premake template
-----------------------------------------------------------------------------------------------------------------------------
    -- Setup the path to MSDK
    msdk = "MSDK/"
    -- Setup the name of your plugin's folder
    sources_folder = "PluginSources"
-- Setup the solution
solution "Game"
    configurations { "Debug", "Release" }
    platforms { "x32", "x64" }
    if os.is("windows") then defines { "_WIN32", "WIN32" }
    elseif os.is("macosx") then defines { "__APPLE__", "MACOSX" }
    elseif os.is("linux") then defines { "LINUX", "linux" } end
    configuration "Debug"
        defines { "DEBUG" }
        flags { "Symbols" }
    configuration "Release"
        defines { "NDEBUG" }
        flags { "OptimizeSpeed" }
    -- Includes directories
    includedirs { msdk .. "MCore/Includes", msdk .. "MEngine/Includes" }
    -- External libraries
    if os.is("windows") then libdirs { sources_folder } end -- set path to MCore & MEngine (dll for minGW, lib for visual studio)
    -- Build plugin from sources ~ NB: do not rename it here, but strip "lib" from "libGame.so"
    project "Game"
        kind "SharedLib"
        language "C++"
        files { sources_folder .. "/**" }
        if os.is("windows") then links { "MEngine", "MCore" } endNB: you must edit this script to match the location of Maratis SDK libs and of your plugin sources.
This script must be saved as 'premake4.lua' in your project folder.
Last edited by com3D (2014-01-29 06:06:23)