[CMake] figuring out exact name of boost-regex lib to use

Bart Vandewoestyne Bart.Vandewoestyne at telenet.be
Tue Feb 28 04:00:18 EST 2012


Hello list,

I'm quite new to CMake, still learning my way around...  I currently 
have the following in a CMakeList.txt file:

   set(BOOST_LIBNAME "boost_regex")
   #set(BOOST_LIBNAME "boost_regex-mt")
   target_link_libraries(airspace ${BOOST_LIBNAME})

On some platforms, it only works if I set the Boost RegEx library name 
to "boost_regex", on others it only works with "boost_regex-mt".

Up until now, I always uncomment the correct form, depending on what 
platform I am (Linux, Cygwin,...) but this is quite annoying.  How can I 
figure out automatically the name of the Boost RegEx library to use?

Thanks!
Bart


More information about the CMake mailing list