I am trying to install CGAL. They describe their installation process as ever-so-simple here, section 6.1. When I run cmake-gui
and then click configure
Your system (through CMake) is not able to find Boost complied static libraries (.a files). So try to include the path in the CMake file where the .a files exist in your system. For example,
set(BOOST_LIBRARYDIR {Path_here_to_boost_Static_libraries}).
This worked for me.
Your output shows that CMake is searching for the libraries in the following places:
D:/program files/boost_1_51/bin/lib
D:/program files/boost_1_51/bin/stage/lib
D:/program files/boost_1_51/lib
D:/program files/boost_1_51/../lib
D:/program files/boost_1_51/stage/lib
C:/boost/lib
C:/boost
C:\Program Files (x86)/boost/boost_1_51_0/lib
C:\Program Files (x86)/boost/boost_1_51/lib
C:\Program Files (x86)/boost/lib
C:\Program Files (x86)/boost
/sw/local/lib
It also shows that it's expecting the libraries to be named in a certain way. For example, the release version of Boost.Thread:
boost_thread-vc100-mt-1_51
boost_thread-vc100-mt
boost_thread-mt-1_51
boost_thread-mt
boost_thread
If your Boost libraries do exist in one of the searched locations, then it's probably the name of the library that's the problem. You can adjust the expected name of the Boost libraries by setting the appropriate CMake variables relevant to the FindBoost module.
For example, if you built Boost using bjam with link=static threading=multi
then in your CMakeLists.txt before find_package(Boost ...)
you'll want to do
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
Or invoke CMake with -DBoost_USE_STATIC_LIBS=ON -DBoost_USE_MULTITHREADED=ON
.
As @noam has pointed out in the comments below, in this particular case, it appears that CGAL requires the shared (DLL) versions of the Boost libraries; passing -DBoost_USE_STATIC_LIBS=ON
on the command line doesn't have any effect.
Today I tried installing CGAL with Boost 1.57 x64 on Windows and encountered the same problem. I installed Boost via pre-build binaries and the .lib files that CMake searches for are in the lib64-msvc-12.0
folder.
Therefore adding BOOST_LIBRARYDIR=.../boost_1_57_0/lib64-msvc-12.0
to CMake options was the solution for me.
CGAL uses the shared Boost libraries. So, the libraries like "libboost_thread-vc100-mt-p-1_49.lib" are statically linked libraries.
It's because CMake (I used v2.8.9) can not read the name of Boost libraries correctly. When I changed the library names, boost_thread-vc100-mt-p-1_49.dll and boost_thread-vc100-mt-p-1_49.lib to boost_thread-vc100-mt-1_49.dll and boost_thread-vc100-mt-1_49, respectively, it fixed the problem.
I had this error, but I have progressed.
I was using the CMake GUI, ticked the checkbox "Advanced" (between checkbox "Grouped" and button "Add Entry"), and ticked the newly seen checkbox "CGAL_Boost_USE_STATIC_LIBS".
You may need to press "Configure" an extra time or two before the extra options are revealed.