I am trying to build an Open Source project called PCL which uses Boost, and CMake's ability to find the Boost libraries seems dependent on whether the BOOST_LIBRARYDIR contains a literal path string, or whether it contains a string that incorporates the expansion of BOOST_ROOT. Here are the details:
Boost is installed from a pre-built installer in the folder C:\local\boost_1_55_0. This folder contains, among other things, a subfolder called "boost", which contains the headers, and a subfolder called "lib64-msvc-12.0", which contains 64-bit libraries built with MS Visual Studio 2013. Ordinarily, CMake would like that folder to be called simply "lib", but that's not what the installer created, so I'm trying to override the default with environment variables. I have the following three environment variables defined, all of which are of type "Expandable string": BOOST_ROOT=C:\local\boost_1_55_0 BOOST_INCLUDEDIR=%BOOST_ROOT% BOOST_LIBRARYDIR=%BOOST_ROOT%\lib64-msvc-12.0 With these settings, CMake reports an error during the configuration process, as follows: CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindBoost.cmake:1179 (message): Unable to find the requested Boost libraries. Boost version: 1.55.0 Boost include path: C:/local/boost_1_55_0 Could not find the following Boost libraries: boost_system boost_filesystem boost_thread boost_date_time boost_iostreams boost_chrono No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost. Call Stack (most recent call first): cmake/pcl_find_boost.cmake:38 (find_package) CMakeLists.txt:230 (include) But if change the definition of BOOST_LIBRARYDIR by replacing "%BOOST_ROOT%" with the value assigned to BOOST_ROOT, resulting in this: BOOST_LIBRARYDIR=C:\local\boost_1_55_0\lib64-msvc-12.0 the configuration succeeds. The only difference seems to be whether the "C:\local\boost_1_55_0" part of the path is specified explicitly, or obtained implicitly with %BOOST_ROOT%. It would surprise me if this behavior were by design. Does anyone have an explanation for this? Thanks, Chris Christopher R. Volpe, Ph.D. Senior Scientist, Remote Sensing & Decision Analytics [Description: Description: cid:image003.png@01CE888B.0167BAD0] NATIONAL SECURITY | INFRASTRUCTURE | ENERGY & ENVIRONMENT | HEALTH SOLUTIONS Applied Research Associates, Inc. 8537 Six Forks Road, Suite 600, Raleigh, NC 27615 | T 919.582.3380 | F 919.582.3301 Find Us Online www.ara.com<http://www.ara.com> Facebook: Applied Research Associates<https://www.facebook.com/#!/AppliedResearchAssociates> LinkedIn: Company Page<http://www.linkedin.com/company/8853?trk=tyah> LinkedIn Group<http://www.linkedin.com/groups/ARA-Employees-Group-4854334?trk=myg_ugrp_ovr> Twitter: ARA News<https://twitter.com/ARA_News_Events> YouTube: Applied Research Associates<http://www.youtube.com/user/AppliedResearch1?feature=mhee>
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake