[CMake] Expected boost path structure.

John Drescher drescherjm at gmail.com
Thu Feb 17 11:30:59 EST 2011


On Thu, Feb 17, 2011 at 11:25 AM, John Drescher <drescherjm at gmail.com> wrote:
> On Thu, Feb 17, 2011 at 11:05 AM, David Cole <david.cole at kitware.com> wrote:
>> Are you escaping the "\" characters, like this?
>> set(BOOST_ROOT "X:\\32bit\\VC ...")
>>
>> Or using the CMake convention "/" as a path separator character?
>> set(BOOST_ROOT "X:/32bit/VC ...")
>> (this is the one you should be doing...)
>>
> I see. I set an BOOST_ROOT as an environment variable instead of a
> CMake variable. It works when I set BOOST_ROOT as a CMake variable.
>

Hmm. That should have worked since the FindBoost.cmake evaluates the
environment variable BOOST_ROOT or BOOSTROOT

 # If BOOST_ROOT was defined in the environment, use it.
  if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
    set(BOOST_ROOT $ENV{BOOST_ROOT})
  endif()

  # If BOOSTROOT was defined in the environment, use it.
  if (NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "")
    set(BOOST_ROOT $ENV{BOOSTROOT})
  endif()

I will try to figure this one out..
John


More information about the CMake mailing list