I found that when using the FindBoost.cmake and using the Boost_USE_STATIC_LIBS
option, it wouldn't find the static libs in my C:\Boost\libs folder. It kept
coming back with files ending in -gd libs instead of -sgd libs even though the
option Boost_USE_STATIC_LIBS was set. I found that it had to do with the order
that the FIND_LIBRARY looks for the files. I had BOTH the -gd and the -sgd
libraries installed so it found the -gd ones first and then ignores the next
option. I fixed it by applying the following:
728,729c728,729
< NAMES
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
<
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
---
> NAMES
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
I just switched the order to look for the more specific lib before the more
general one. If ${_boost_STATIC_TAG} is empty when Boost_USE_STATIC_LIBS is
OFF, then maybe this could just be one line:
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
Which seems like it should find either -sgd or -gd files, but sould find -sgd
files first if the option was provided. Any thoughts? I defer to anyone with
more experience for the best way to do this.
--
Shane
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake