Skip to content
Manu Evans edited this page Apr 7, 2015 · 4 revisions

Map solution level configuration and platforms to a different project configuration or platform.

configmap {
   [{ sln_cfg }] = { prj_cfg },

You may map multiple configurations in a single configuration map.

Applies To

Projects.

Parameters

sln_cfg is the solution configuration being mapped. It can be a string representing a build configuration or a platform, or a table holding a build configuration/platform pair.

prj_cfg is the project configuration to which the solution configuration should be mapped. It may also be a string or a build configuration/platform pair.

Availability

5.0 or later.

Examples

The solution contains four build configurations, while the project contains only the standard Debug and Release. Map the extra solution configurations to Debug and Release.

solution "MySolution"
   configurations { "Debug", "Development", "Profile", "Release" }

project "MyProject"
   configmap {
      ["Development"] = "Debug",
      ["Profile"] = "Release",
   }

It can be useful to specify a map globally for a solution, but only apply it if the target configuration is actually present in the project. In this example, host executables can be built for either Windows or Mac, while some projects build for an embedded controller. Any project that uses the special "Embedded" platform will receive the configuration map.

solution "MySolution"
   configurations { "Debug", "Release" }
   platforms { "Windows", "Mac" }

   filter { "platforms:Embedded" }
      configmap {
         ["Windows"] = "Embedded",
         ["Mac"] = "Embedded"
      }

-- this project gets the configuration map, because it defines an "Embedded" platform
project "MyEmbeddedProject"
   platforms { "Embedded" }

-- this one does not
project "MyHostProject"
Clone this wiki locally