2

I'm using CMake to generate a Visual Studio solution. I want my solution to have multiple configurations - x86 Debug/Release and x86_64 Debug/Release.

For each of these configurations, I need to link my project against different versions of my dependencies (i.e. I need the 64-bit, debug build against the 64-bit, debug version of the unit test library).

Here is how I want to do it: I'll place the binary versions of dependencies into folders names after the configurations, for example:

<project root>/deps/x86_64_debug/library.lib

The question is, how can I tell CMake to look for libraries in the appropriate folder? Are there any CMake variables that indicate the target platform and release/debug status of the "current configuration" for a multi-config generator?

nicebyte
  • 1,498
  • 11
  • 21

1 Answers1

3

Please consult documentation for generator expressions

Generator expressions are evaluated during build system generation to produce information specific to each build configuration.

Peter Petrik
  • 9,701
  • 5
  • 41
  • 65