Cmake cannot find Boost libraries - c++

I am new to Cmake and boost libraries in C++. I am working on a project that needs boost and Cmake. I am using Cmake version 2.8.11, MS Visual Studio 2013 and Boost 1.54.0. When I try to configure from Cmake, it is giving the following error:
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1106 (message):
Unable to find the requested Boost libraries.
Boost version: 1.54.0
Boost include path: D:/boost_1_54_0
The following Boost libraries could not be found:
boost_thread
boost_system
boost_log
boost_log_setup
boost_program_options
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):
CMakeLists.txt:20 (find_package)
I have seen quite a few questions related to mine and tried, but all went in vain. My Cmakelists.txt file looks like this:
################################
# Boost
################################
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
ADD_DEFINITIONS(-DBoost_USE_STATIC_LIBS=ON)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
set(Boost_INCLUDE_DIR D:/boost_1_54_0)
set(Boost_LIBRARY_DIR D:/boost_1_54_0/stage/lib)
find_package( Boost 1.54.0 REQUIRED thread system log log_setup program_options)
find_package( Threads )
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
LINK_DIRECTORIES(${Boost_LIBRARY_DIR})
The CMake output after setting Boost_DEBUG ON is as follows:
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:476 ] _boost_TEST_VERSIONS = 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHREADED = TRUE
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LIBS = TRUE
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RUNTIME =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VERSIONS =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PATHS =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:538 ] Declared as CMake or Environmental Variables:
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:540 ] BOOST_ROOT = D:/boost_1_54_0
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:542 ] BOOST_INCLUDEDIR =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:544 ] BOOST_LIBRARYDIR =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:546 ] _boost_TEST_VERSIONS = 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:615 ] Include debugging info:
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:617 ] _boost_INCLUDE_SEARCH_DIRS = D:/boost_1_54_0/include;D:/boost_1_54_0;PATHS;C:/boost/include;C:/boost;/sw/local/include
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:619 ] _boost_PATH_SUFFIXES = boost-1_56_0;boost_1_56_0;boost/boost-1_56_0;boost/boost_1_56_0;boost-1_56;boost_1_56;boost/boost-1_56;boost/boost_1_56;boost-1_55_0;boost_1_55_0;boost/boost-1_55_0;boost/boost_1_55_0;boost-1_55;boost_1_55;boost/boost-1_55;boost/boost_1_55;boost-1_54_0;boost_1_54_0;boost/boost-1_54_0;boost/boost_1_54_0;boost-1_54;boost_1_54;boost/boost-1_54;boost/boost_1_54
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:639 ] location of version.hpp: D:/boost_1_54_0/boost/version.hpp
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:663 ] version.hpp reveals boost 1.54.0
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:739 ] guessed _boost_COMPILER = -vc120
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADED = -mt
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:792 ] _boost_RELEASE_ABI_TAG = -
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:794 ] _boost_DEBUG_ABI_TAG = -gd
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:842 ] _boost_LIBRARY_SEARCH_DIRS = D:/boost_1_54_0/lib;D:/boost_1_54_0/stage/lib;D:/boost_1_54_0/lib;D:/boost_1_54_0/../lib;D:/boost_1_54_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for THREAD_LIBRARY_RELEASE: libboost_thread-vc120-mt-1_54;libboost_thread-vc120-mt;libboost_thread-mt-1_54;libboost_thread-mt;libboost_thread;libboost_thread-vc120-mt-s-1_54;libboost_thread-vc120-mt-s;libboost_thread-mt-s-1_54;libboost_thread-mt-s
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:966 ] Searching for THREAD_LIBRARY_DEBUG: libboost_thread-vc120-mt-gd-1_54;libboost_thread-vc120-mt-gd;libboost_thread-mt-gd-1_54;libboost_thread-mt-gd;libboost_thread-mt;libboost_thread;libboost_thread-vc120-mt-s-gd-1_54;libboost_thread-vc120-mt-s-gd;libboost_thread-mt-s-gd-1_54;libboost_thread-mt-s-gd
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for SYSTEM_LIBRARY_RELEASE: libboost_system-vc120-mt-1_54;libboost_system-vc120-mt;libboost_system-mt-1_54;libboost_system-mt;libboost_system;libboost_system-vc120-mt-s-1_54;libboost_system-vc120-mt-s;libboost_system-mt-s-1_54;libboost_system-mt-s
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:966 ] Searching for SYSTEM_LIBRARY_DEBUG: libboost_system-vc120-mt-gd-1_54;libboost_system-vc120-mt-gd;libboost_system-mt-gd-1_54;libboost_system-mt-gd;libboost_system-mt;libboost_system;libboost_system-vc120-mt-s-gd-1_54;libboost_system-vc120-mt-s-gd;libboost_system-mt-s-gd-1_54;libboost_system-mt-s-gd
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for LOG_LIBRARY_RELEASE: libboost_log-vc120-mt-1_54;libboost_log-vc120-mt;libboost_log-mt-1_54;libboost_log-mt;libboost_log;libboost_log-vc120-mt-s-1_54;libboost_log-vc120-mt-s;libboost_log-mt-s-1_54;libboost_log-mt-s
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:966 ] Searching for LOG_LIBRARY_DEBUG: libboost_log-vc120-mt-gd-1_54;libboost_log-vc120-mt-gd;libboost_log-mt-gd-1_54;libboost_log-mt-gd;libboost_log-mt;libboost_log;libboost_log-vc120-mt-s-gd-1_54;libboost_log-vc120-mt-s-gd;libboost_log-mt-s-gd-1_54;libboost_log-mt-s-gd
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for LOG_SETUP_LIBRARY_RELEASE: libboost_log_setup-vc120-mt-1_54;libboost_log_setup-vc120-mt;libboost_log_setup-mt-1_54;libboost_log_setup-mt;libboost_log_setup;libboost_log_setup-vc120-mt-s-1_54;libboost_log_setup-vc120-mt-s;libboost_log_setup-mt-s-1_54;libboost_log_setup-mt-s
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:966 ] Searching for LOG_SETUP_LIBRARY_DEBUG: libboost_log_setup-vc120-mt-gd-1_54;libboost_log_setup-vc120-mt-gd;libboost_log_setup-mt-gd-1_54;libboost_log_setup-mt-gd;libboost_log_setup-mt;libboost_log_setup;libboost_log_setup-vc120-mt-s-gd-1_54;libboost_log_setup-vc120-mt-s-gd;libboost_log_setup-mt-s-gd-1_54;libboost_log_setup-mt-s-gd
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for PROGRAM_OPTIONS_LIBRARY_RELEASE: libboost_program_options-vc120-mt-1_54;libboost_program_options-vc120-mt;libboost_program_options-mt-1_54;libboost_program_options-mt;libboost_program_options;libboost_program_options-vc120-mt-s-1_54;libboost_program_options-vc120-mt-s;libboost_program_options-mt-s-1_54;libboost_program_options-mt-s
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:966 ] Searching for PROGRAM_OPTIONS_LIBRARY_DEBUG: libboost_program_options-vc120-mt-gd-1_54;libboost_program_options-vc120-mt-gd;libboost_program_options-mt-gd-1_54;libboost_program_options-mt-gd;libboost_program_options-mt;libboost_program_options;libboost_program_options-vc120-mt-s-gd-1_54;libboost_program_options-vc120-mt-s-gd;libboost_program_options-mt-s-gd-1_54;libboost_program_options-mt-s-gd
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1017 ] Boost_FOUND = 1
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1106 (message):
Unable to find the requested Boost libraries.
Boost version: 1.54.0
Boost include path: D:/boost_1_54_0
The following Boost libraries could not be found:
boost_thread
boost_system
boost_log
boost_log_setup
boost_program_options
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):
CMakeLists.txt:26 (find_package)
I have also tried writing set(Boost_USE_STATIC_LIBS ON), but unfortunately it did not help. Suggestions are most welcome. Thanks.

Your configuration looks a bit weird and dirty. Especially things like:
ADD_DEFINITIONS(-DBoost_USE_STATIC_LIBS=ON)
It's not a C/C++ preprocessor definition! It's a CMake variable which is used to control how CMake will define the linkage stage of your project with Boost libraries.
If you properly compiled Boost and didn't mess up anything, then the directory structure usually looks like this:
<boost-dir>
include
boost
accumulators
...
aligned_storage.hpp
...
lib
libboost_atomic-mt-s.a
...
NOTE: The root directory of Boost, <boost-dir>, appears to be D:/boost_1_54_0 in your case.
If in your case it does not look like above, then I'd suggest to rearrange it manually to the one above since, once again, this is how it should be.
When done, let's do some CMake configuration. I suggest to keep things simple and clean in the first place, and obey the CMake conventions. Test the following:
set(BOOST_INCLUDEDIR D:/boost_1_54_0/include)
set(BOOST_LIBRARYDIR D:/boost_1_54_0/lib)
NOTE: You can find thorough description of both of these variables at the top of FindBoost.cmake.
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
NOTE: This is how you enforce static linkage by setting the CMake variable properly, but not like you did by setting a non-existent C/C++ preprocessor definition.
find_package(Boost
1.54.0
COMPONENTS thread
system
log
log_setup
program_options
REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries(<target_name> ${Boost_LIBRARIES})
NOTE: Instead of <target_name>, put the name of the target that you wish to build (executable, static/shared library, etc.).

Boost 1.54.0 cannot be built with VS2013 without applying some patches. See also here How do I build boost with new Visual Studio 2013 preview?
If you build it correctly, everything else should work.

In the lib folder, rename:
libboost_thread-vc100-mt-1_49.lib to boost_thread-vc100-mt-1_49.lib
libboost_thread-vc100-mt-gd-1_49.lib to boost_thread-vc100-mt-gd-1_49.lib
... and so on. Then they can be found.

Related

CMake does not find Boost on Custom Location on Windows

I have downloaded and build Boost as described in the Getting Started on Windows Documentation.
Now i want to link a sample program to that Version of Boost via CMake.
This is my current Folder Structure:
cmake-boost
- boost_1_73_0/ (Boost folder)
- build/
- CMakeLists.txt
- cmake-boost.cpp
This is the content of my CMakeLists.txt File:
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(cmake-boost LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(BOOST_ROOT "boost_1_73_0")
set(BOOST_LIBRARYDIR "boost_1_73_0/stage/lib")
find_package(Boost REQUIRED COMPONENTS regex)
if(Boost_FOUND)
message(STATUS "Success!")
endif()
add_executable(cmake-boost cmake-boost.cpp)
target_link_libraries(cmake-boost
PUBLIC
Boost::regex
)
If i run cmake .. from inside the build Folder all i get is the following Message saying it could not find the requested Library.
CMake Warning at C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:896 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1018 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1694 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:12 (find_package)
CMake Error at C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:2124 (message):
Unable to find the requested Boost libraries.
Boost version: 1.73.0
Boost include path:
C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0
Could not find the following Boost libraries:
boost_regex
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):
CMakeLists.txt:12 (find_package)
-- Configuring incomplete, errors occurred!
What is wrong with my CMakeFile?
UPDATE:
Here is the output of cmake -DBoost_DEBUG=ON ..
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17763.
-- The CXX compiler identification is MSVC 19.26.28806.0
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1181 ] _boost_TEST_VERSIONS = 1.70.0;1.70;1.69.0;1.69
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1183 ] Boost_USE_MULTITHREADED = TRUE
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1185 ] Boost_USE_STATIC_LIBS =
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1187 ] Boost_USE_STATIC_RUNTIME =
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1189 ] Boost_ADDITIONAL_VERSIONS =
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1191 ] Boost_NO_SYSTEM_PATHS =
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1259 ] Declared as CMake or Environmental Variables:
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1261 ] BOOST_ROOT = boost_1_73_0
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1263 ] BOOST_INCLUDEDIR =
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1265 ] BOOST_LIBRARYDIR = boost_1_73_0/stage/lib
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1267 ] _boost_TEST_VERSIONS = 1.70.0;1.70;1.69.0;1.69
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1342 ] Include debugging info:
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1344 ] _boost_INCLUDE_SEARCH_DIRS = boost_1_73_0/include;boost_1_73_0;PATHS;C:/local/boost_1_70_0;PATHS;C:/local/boost_1_70;PATHS;C:/local/boost_1_69_0;PATHS;C:/local/boost_1_69;PATHS;C:/boost/include;C:/boost;/sw/local/include
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1346 ] _boost_PATH_SUFFIXES = boost-1_70_0;boost_1_70_0;boost/boost-1_70_0;boost/boost_1_70_0;boost-1_70;boost_1_70;boost/boost-1_70;boost/boost_1_70;boost-1_69_0;boost_1_69_0;boost/boost-1_69_0;boost/boost_1_69_0;boost-1_69;boost_1_69;boost/boost-1_69;boost/boost_1_69
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1366 ] location of version.hpp: C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/boost/version.hpp
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1391 ] version.hpp reveals boost 1.73.0
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1447 ] Boost_LIB_PREFIX =
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1449 ] Boost_NAMESPACE = boost
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1484 ] guessed _boost_COMPILER = -vc141;-vc140
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1494 ] _boost_MULTITHREADED = -mt
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1578 ] _boost_RELEASE_ABI_TAG = -
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1580 ] _boost_DEBUG_ABI_TAG = -gd
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1643 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = boost_1_73_0/stage/lib;boost_1_73_0/lib;boost_1_73_0/stage/lib;boost_1_73_0/lib64-msvc-14.1;boost_1_73_0/lib64-msvc-14.0;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/lib;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/../lib;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/stage/lib;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/../lib64-msvc-14.1;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/../lib64-msvc-14.0;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/lib64-msvc-14.1;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/lib64-msvc-14.0;C:/local/boost_1_70_0/lib64-msvc-14.1;C:/local/boost_1_70_0/lib64-msvc-14.0;C:/local/boost_1_70/lib64-msvc-14.1;C:/local/boost_1_70/lib64-msvc-14.0;C:/local/boost_1_69_0/lib64-msvc-14.1;C:/local/boost_1_69_0/lib64-msvc-14.0;C:/local/boost_1_69/lib64-msvc-14.1;C:/local/boost_1_69/lib64-msvc-14.0;C:/boost/lib64-msvc-14.1;C:/boost/lib64-msvc-14.0;PATHS;C:/boost/lib;C:/boost;/sw/local/lib_boost_LIBRARY_SEARCH_DIRS_DEBUG = boost_1_73_0/stage/lib;boost_1_73_0/lib;boost_1_73_0/stage/lib;boost_1_73_0/lib64-msvc-14.1;boost_1_73_0/lib64-msvc-14.0;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/lib;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/../lib;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/stage/lib;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/../lib64-msvc-14.1;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/../lib64-msvc-14.0;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/lib64-msvc-14.1;C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0/lib64-msvc-14.0;C:/local/boost_1_70_0/lib64-msvc-14.1;C:/local/boost_1_70_0/lib64-msvc-14.0;C:/local/boost_1_70/lib64-msvc-14.1;C:/local/boost_1_70/lib64-msvc-14.0;C:/local/boost_1_69_0/lib64-msvc-14.1;C:/local/boost_1_69_0/lib64-msvc-14.0;C:/local/boost_1_69/lib64-msvc-14.1;C:/local/boost_1_69/lib64-msvc-14.0;C:/boost/lib64-msvc-14.1;C:/boost/lib64-msvc-14.0;PATHS;C:/boost/lib;C:/boost;/sw/local/lib
CMake Warning at C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:896 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1018 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1694 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:12 (find_package)
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1833 ] Searching for REGEX_LIBRARY_RELEASE: boost_regex-vc141-mt-x64-1_73;boost_regex-vc141-mt;boost_regex-vc140-mt-x64-1_73;boost_regex-vc140-mt;boost_regex-mt-x64-1_73;boost_regex-mt;boost_regex-mt;boost_regex
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1886 ] Searching for REGEX_LIBRARY_DEBUG: boost_regex-vc141-mt-gd-x64-1_73;boost_regex-vc141-mt-gd;boost_regex-vc140-mt-gd-x64-1_73;boost_regex-vc140-mt-gd;boost_regex-mt-gd-x64-1_73;boost_regex-mt-gd;boost_regex-mt;boost_regex
-- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1960 ] Boost_FOUND = 1
CMake Error at C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:2124 (message):
Unable to find the requested Boost libraries.
Boost version: 1.73.0
Boost include path:
C:/Users/djc3ho/Documents/Programming/cpp/_Testing/cmake_boost/boost_1_73_0
Could not find the following Boost libraries:
boost_regex
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):
CMakeLists.txt:12 (find_package)
I have noticed two things which are possible wrong:
This line -- [ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1484 ] guessed _boost_COMPILER = -vc141;-vc140 but if i look at the .lib Files generated during the build of boost, they have the -vc142 in their name
It seems that cmake searching the right folder but with the wrong name of the library file. It uses the name boost_regex-vc141-mt-x64-1_73 but the lib files from my boost build startet with lib like libboost_regex-vc142-mt-x64-1_73.lib
I solved the first issue by adding -DBoost_COMPILER=-v142 to the cmake command. But i could not set the Boost_LIB_PREFIX with -DBoost_LIB_PREFIX=lib
I have found a solution.
As mentioned in the last edit I made to my question, the first issue with the compiler could be fixed with the -DBoost_COMPILER=-vc142 option.
The second could be solved by using the -DBoost_USE_STATIC_LIBS=ON.
So the set block in the CMakeLists for boost is now:
set(BOOST_ROOT "boost_1_73_0")
set(Boost_COMPILER "-vc142")
set(Boost_USE_STATIC_LIBS ON)
With these variables set, CMake runs without any problems.

CMake 3.11 on Linux Mint 19 is unable to find static Boost libraries

I am working on a project and using CMake to build the project. The project works flawlessly on Windows but I want to make a Linux variant using the same CMakeLists.txt file.
Here is the relevant part of my CMakeLists.txt file:
if(WIN32)
set(BOOST_ROOT "C:\\Boost")
set(BOOST_INCLUDEDIR "C:\\Boost\\include\\boost-1_68")
endif(WIN32)
if(UNIX)
set(Boost_DEBUG ON)
set(Boost_NAMESPACE "libboost")
set(Boost_USE_STATIC_RUNTIME OFF)
endif(UNIX)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_DEBUG_LIBS OFF)
find_package(Boost REQUIRED random filesystem serialization)
include_directories(${Boost_INCLUDE_DIRS})
I installed Boost using the command sudo apt install libboost_all-dev.
I get the errors shown below when I try to configure the project.
CMake Error at /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/
FindBoost.cmake:2044 (message):
Unable to find the requested Boost libraries.
Boost version: 1.65.1
Boost include path: /usr/include
Could not find the following static Boost libraries:
libboost_random
libboost_filesystem
libboost_serialization
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
CMakeLists.txt:49 (find_package)
...
Here is the full output.
/opt/clion-2018.2/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /home/dave/CLionProjects/FNDice-win
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1121 ] _boost_TEST_VERSIONS = 1.68.0;1.68;1.67.0;1.67;1.66.0;1.66;1.65.1;1.65.0;1.65;1.64.0;1.64;1.63.0;1.63;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1123 ] Boost_USE_MULTITHREADED = TRUE
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1125 ] Boost_USE_STATIC_LIBS = ON
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1127 ] Boost_USE_STATIC_RUNTIME = OFF
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1129 ] Boost_ADDITIONAL_VERSIONS =
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1131 ] Boost_NO_SYSTEM_PATHS =
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1199 ] Declared as CMake or Environmental Variables:
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1201 ] BOOST_ROOT =
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1203 ] BOOST_INCLUDEDIR =
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1205 ] BOOST_LIBRARYDIR =
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1207 ] _boost_TEST_VERSIONS = 1.68.0;1.68;1.67.0;1.67;1.66.0;1.66;1.65.1;1.65.0;1.65;1.64.0;1.64;1.63.0;1.63;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1282 ] Include debugging info:
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1284 ] _boost_INCLUDE_SEARCH_DIRS = PATHS;C:/boost/include;C:/boost;/sw/local/include
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1286 ] _boost_PATH_SUFFIXES = boost-1_68_0;boost_1_68_0;boost/boost-1_68_0;boost/boost_1_68_0;boost-1_68;boost_1_68;boost/boost-1_68;boost/boost_1_68;boost-1_67_0;boost_1_67_0;boost/boost-1_67_0;boost/boost_1_67_0;boost-1_67;boost_1_67;boost/boost-1_67;boost/boost_1_67;boost-1_66_0;boost_1_66_0;boost/boost-1_66_0;boost/boost_1_66_0;boost-1_66;boost_1_66;boost/boost-1_66;boost/boost_1_66;boost-1_65_1;boost_1_65_1;boost/boost-1_65_1;boost/boost_1_65_1;boost-1_65_0;boost_1_65_0;boost/boost-1_65_0;boost/boost_1_65_0;boost-1_65;boost_1_65;boost/boost-1_65;boost/boost_1_65;boost-1_64_0;boost_1_64_0;boost/boost-1_64_0;boost/boost_1_64_0;boost-1_64;boost_1_64;boost/boost-1_64;boost/boost_1_64;boost-1_63_0;boost_1_63_0;boost/boost-1_63_0;boost/boost_1_63_0;boost-1_63;boost_1_63;boost/boost-1_63;boost/boost_1_63;boost-1_62_0;boost_1_62_0;boost/boost-1_62_0;boost/boost_1_62_0;boost-1_62;boost_1_62;boost/boost-1_62;boost/boost_1_62;boost-1_61_0;boost_1_61_0;boost/boost-1_61_0;boost/boost_1_61_0;boost-1_61;boost_1_61;boost/boost-1_61;boost/boost_1_61;boost-1_60_0;boost_1_60_0;boost/boost-1_60_0;boost/boost_1_60_0;boost-1_60;boost_1_60;boost/boost-1_60;boost/boost_1_60;boost-1_59_0;boost_1_59_0;boost/boost-1_59_0;boost/boost_1_59_0;boost-1_59;boost_1_59;boost/boost-1_59;boost/boost_1_59;boost-1_58_0;boost_1_58_0;boost/boost-1_58_0;boost/boost_1_58_0;boost-1_58;boost_1_58;boost/boost-1_58;boost/boost_1_58;boost-1_57_0;boost_1_57_0;boost/boost-1_57_0;boost/boost_1_57_0;boost-1_57;boost_1_57;boost/boost-1_57;boost/boost_1_57;boost-1_56_0;boost_1_56_0;boost/boost-1_56_0;boost/boost_1_56_0;boost-1_56;boost_1_56;boost/boost-1_56;boost/boost_1_56;boost-1_55_0;boost_1_55_0;boost/boost-1_55_0;boost/boost_1_55_0;boost-1_55;boost_1_55;boost/boost-1_55;boost/boost_1_55;boost-1_54_0;boost_1_54_0;boost/boost-1_54_0;boost/boost_1_54_0;boost-1_54;boost_1_54;boost/boost-1_54;boost/boost_1_54;boost-1_53_0;boost_1_53_0;boost/boost-1_53_0;boost/boost_1_53_0;boost-1_53;boost_1_53;boost/boost-1_53;boost/boost_1_53;boost-1_52_0;boost_1_52_0;boost/boost-1_52_0;boost/boost_1_52_0;boost-1_52;boost_1_52;boost/boost-1_52;boost/boost_1_52;boost-1_51_0;boost_1_51_0;boost/boost-1_51_0;boost/boost_1_51_0;boost-1_51;boost_1_51;boost/boost-1_51;boost/boost_1_51;boost-1_50_0;boost_1_50_0;boost/boost-1_50_0;boost/boost_1_50_0;boost-1_50;boost_1_50;boost/boost-1_50;boost/boost_1_50;boost-1_49_0;boost_1_49_0;boost/boost-1_49_0;boost/boost_1_49_0;boost-1_49;boost_1_49;boost/boost-1_49;boost/boost_1_49;boost-1_48_0;boost_1_48_0;boost/boost-1_48_0;boost/boost_1_48_0;boost-1_48;boost_1_48;boost/boost-1_48;boost/boost_1_48;boost-1_47_0;boost_1_47_0;boost/boost-1_47_0;boost/boost_1_47_0;boost-1_47;boost_1_47;boost/boost-1_47;boost/boost_1_47;boost-1_46_1;boost_1_46_1;boost/boost-1_46_1;boost/boost_1_46_1;boost-1_46_0;boost_1_46_0;boost/boost-1_46_0;boost/boost_1_46_0;boost-1_46;boost_1_46;boost/boost-1_46;boost/boost_1_46;boost-1_45_0;boost_1_45_0;boost/boost-1_45_0;boost/boost_1_45_0;boost-1_45;boost_1_45;boost/boost-1_45;boost/boost_1_45;boost-1_44_0;boost_1_44_0;boost/boost-1_44_0;boost/boost_1_44_0;boost-1_44;boost_1_44;boost/boost-1_44;boost/boost_1_44;boost-1_43_0;boost_1_43_0;boost/boost-1_43_0;boost/boost_1_43_0;boost-1_43;boost_1_43;boost/boost-1_43;boost/boost_1_43;boost-1_42_0;boost_1_42_0;boost/boost-1_42_0;boost/boost_1_42_0;boost-1_42;boost_1_42;boost/boost-1_42;boost/boost_1_42;boost-1_41_0;boost_1_41_0;boost/boost-1_41_0;boost/boost_1_41_0;boost-1_41;boost_1_41;boost/boost-1_41;boost/boost_1_41;boost-1_40_0;boost_1_40_0;boost/boost-1_40_0;boost/boost_1_40_0;boost-1_40;boost_1_40;boost/boost-1_40;boost/boost_1_40;boost-1_39_0;boost_1_39_0;boost/boost-1_39_0;boost/boost_1_39_0;boost-1_39;boost_1_39;boost/boost-1_39;boost/boost_1_39;boost-1_38_0;boost_1_38_0;boost/boost-1_38_0;boost/boost_1_38_0;boost-1_38;boost_1_38;boost/boost-1_38;boost/boost_1_38;boost-1_37_0;boost_1_37_0;boost/boost-1_37_0;boost/boost_1_37_0;boost-1_37;boost_1_37;boost/boost-1_37;boost/boost_1_37;boost-1_36_1;boost_1_36_1;boost/boost-1_36_1;boost/boost_1_36_1;boost-1_36_0;boost_1_36_0;boost/boost-1_36_0;boost/boost_1_36_0;boost-1_36;boost_1_36;boost/boost-1_36;boost/boost_1_36;boost-1_35_1;boost_1_35_1;boost/boost-1_35_1;boost/boost_1_35_1;boost-1_35_0;boost_1_35_0;boost/boost-1_35_0;boost/boost_1_35_0;boost-1_35;boost_1_35;boost/boost-1_35;boost/boost_1_35;boost-1_34_1;boost_1_34_1;boost/boost-1_34_1;boost/boost_1_34_1;boost-1_34_0;boost_1_34_0;boost/boost-1_34_0;boost/boost_1_34_0;boost-1_34;boost_1_34;boost/boost-1_34;boost/boost_1_34;boost-1_33_1;boost_1_33_1;boost/boost-1_33_1;boost/boost_1_33_1;boost-1_33_0;boost_1_33_0;boost/boost-1_33_0;boost/boost_1_33_0;boost-1_33;boost_1_33;boost/boost-1_33;boost/boost_1_33
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1306 ] location of version.hpp: /usr/include/boost/version.hpp
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1330 ] version.hpp reveals boost 1.65.1
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1416 ] guessed _boost_COMPILER = -gcc73
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1426 ] _boost_MULTITHREADED = -mt
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1502 ] _boost_RELEASE_ABI_TAG = -
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1504 ] _boost_DEBUG_ABI_TAG = -d
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1567 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = /usr/include/lib;/usr/include/../lib;/usr/include/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib_boost_LIBRARY_SEARCH_DIRS_DEBUG = /usr/include/lib;/usr/include/../lib;/usr/include/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1756 ] Searching for RANDOM_LIBRARY_RELEASE: libboost_random-gcc73-mt-1_65_1;libboost_random-gcc73-mt;libboost_random-mt-1_65_1;libboost_random-mt;libboost_random
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1809 ] Searching for RANDOM_LIBRARY_DEBUG: libboost_random-gcc73-mt-d-1_65_1;libboost_random-gcc73-mt-d;libboost_random-mt-d-1_65_1;libboost_random-mt-d;libboost_random-mt;libboost_random
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1756 ] Searching for FILESYSTEM_LIBRARY_RELEASE: libboost_filesystem-gcc73-mt-1_65_1;libboost_filesystem-gcc73-mt;libboost_filesystem-mt-1_65_1;libboost_filesystem-mt;libboost_filesystem
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1809 ] Searching for FILESYSTEM_LIBRARY_DEBUG: libboost_filesystem-gcc73-mt-d-1_65_1;libboost_filesystem-gcc73-mt-d;libboost_filesystem-mt-d-1_65_1;libboost_filesystem-mt-d;libboost_filesystem-mt;libboost_filesystem
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1756 ] Searching for SERIALIZATION_LIBRARY_RELEASE: libboost_serialization-gcc73-mt-1_65_1;libboost_serialization-gcc73-mt;libboost_serialization-mt-1_65_1;libboost_serialization-mt;libboost_serialization
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1809 ] Searching for SERIALIZATION_LIBRARY_DEBUG: libboost_serialization-gcc73-mt-d-1_65_1;libboost_serialization-gcc73-mt-d;libboost_serialization-mt-d-1_65_1;libboost_serialization-mt-d;libboost_serialization-mt;libboost_serialization
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1756 ] Searching for SYSTEM_LIBRARY_RELEASE: libboost_system-gcc73-mt-1_65_1;libboost_system-gcc73-mt;libboost_system-mt-1_65_1;libboost_system-mt;libboost_system
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1809 ] Searching for SYSTEM_LIBRARY_DEBUG: libboost_system-gcc73-mt-d-1_65_1;libboost_system-gcc73-mt-d;libboost_system-mt-d-1_65_1;libboost_system-mt-d;libboost_system-mt;libboost_system
-- [ /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1883 ] Boost_FOUND = 1
CMake Error at /opt/clion-2018.2/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:2044 (message):
Unable to find the requested Boost libraries.
Boost version: 1.65.1
Boost include path: /usr/include
Could not find the following static Boost libraries:
libboost_random
libboost_filesystem
libboost_serialization
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
CMakeLists.txt:49 (find_package)
-- Found wxWidgets: -L/usr/local/lib;-pthread;;;-lwx_baseu_net-3.1;-lwx_gtk3u_gl-3.1;-lwx_gtk3u_core-3.1;-lwx_baseu-3.1;-lwx_gtk3u_webview-3.1;-lwx_gtk3u_adv-3.1 (found version "3.1.1")
-- Configuring incomplete, errors occurred!
See also "/home/dave/CLionProjects/FNDice-win/cmake-build-debug/CMakeFiles/CMakeOutput.log".
[Failed to reload]
Verify that the libraries are in the include path. This may be a bug in your cmake package or your Boost package.
For me, on Fedora, these libraries are in /usr/lib64. On Ubuntu (and from what I could find, Linux Mint) they should be in /usr/lib/x86_64-linux-gnu.
A temporary solution would be to add the directory to the include_directories statement. You might also find this question helpful.

CMake doesn't find Boost library property_tree

I'm trying to cross compile a project which require boost property_tree but I'm having trouble with the CMake on windows.
On my system, boost is located at C:/Program Files (x86)/boost/boost_1_66_0 and the headers file are located in the boost subdirectory. I therefore set those in my CMakeLists.txt
SET (BOOST_ROOT "C:/Program Files (x86)/boost/boost_1_66_0")
SET (BOOST_INCLUDEDIR "${BOOST_ROOT}/boost")
SET(Boost_DEBUG ON)
find_package(Boost REQUIRED COMPONENTS
property_tree )
But Cmake give me the following error:
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1078 ] _boost_TEST_VERSIONS = 1.65.1;1.65.0;1.65;1.64.0;1.64;1.63.0;1.63;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1080 ] Boost_USE_MULTITHREADED = TRUE
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1082 ] Boost_USE_STATIC_LIBS =
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1084 ] Boost_USE_STATIC_RUNTIME =
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1086 ] Boost_ADDITIONAL_VERSIONS =
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1088 ] Boost_NO_SYSTEM_PATHS =
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1156 ] Declared as CMake or Environmental Variables:
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1158 ] BOOST_ROOT = C:/Program Files (x86)/boost/boost_1_66_0
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1160 ] BOOST_INCLUDEDIR = C:/Program Files (x86)/boost/boost_1_66_0/boost
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1162 ] BOOST_LIBRARYDIR =
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1164 ] _boost_TEST_VERSIONS = 1.65.1;1.65.0;1.65;1.64.0;1.64;1.63.0;1.63;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1263 ] location of version.hpp: C:/Program Files (x86)/boost/boost_1_66_0/boost/version.hpp
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1287 ] version.hpp reveals boost 1.66.0
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1373 ] guessed _boost_COMPILER = -vc141;-vc140
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1383 ] _boost_MULTITHREADED = -mt
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1427 ] _boost_RELEASE_ABI_TAG = -
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1429 ] _boost_DEBUG_ABI_TAG = -gd
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1491 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = C:/Program Files (x86)/boost/boost_1_66_0/lib;C:/Program Files (x86)/boost/boost_1_66_0/stage/lib;C:/Program Files (x86)/boost/boost_1_66_0/lib32-msvc-14.1;C:/Program Files (x86)/boost/boost_1_66_0/lib32-msvc-14.0;C:/Program Files (x86)/boost/boost_1_66_0/lib;C:/Program Files (x86)/boost/boost_1_66_0/../lib;C:/Program Files (x86)/boost/boost_1_66_0/stage/lib;C:/Program Files (x86)/boost/boost_1_66_0/../lib32-msvc-14.1;C:/Program Files (x86)/boost/boost_1_66_0/../lib32-msvc-14.0;C:/local/boost_1_65_1/lib32-msvc-14.1;C:/local/boost_1_65_1/lib32-msvc-14.0;C:/local/boost_1_65_0/lib32-msvc-14.1;C:/local/boost_1_65_0/lib32-msvc-14.0;C:/local/boost_1_65/lib32-msvc-14.1;C:/local/boost_1_65/lib32-msvc-14.0;C:/local/boost_1_64_0/lib32-msvc-14.1;C:/local/boost_1_64_0/lib32-msvc-14.0;C:/local/boost_1_64/lib32-msvc-14.1;C:/local/boost_1_64/lib32-msvc-14.0;C:/local/boost_1_63_0/lib32-msvc-14.1;C:/local/boost_1_63_0/lib32-msvc-14.0;C:/local/boost_1_63/lib32-msvc-14.1;C:/local/boost_1_63/lib32-msvc-14.0;C:/local/boost_1_62_0/lib32-msvc-14.1;C:/local/boost_1_62_0/lib32-msvc-14.0;C:/local/boost_1_62/lib32-msvc-14.1;C:/local/boost_1_62/lib32-msvc-14.0;C:/local/boost_1_61_0/lib32-msvc-14.1;C:/local/boost_1_61_0/lib32-msvc-14.0;C:/local/boost_1_61/lib32-msvc-14.1;C:/local/boost_1_61/lib32-msvc-14.0;C:/local/boost_1_60_0/lib32-msvc-14.1;C:/local/boost_1_60_0/lib32-msvc-14.0;C:/local/boost_1_60/lib32-msvc-14.1;C:/local/boost_1_60/lib32-msvc-14.0;C:/local/boost_1_59_0/lib32-msvc-14.1;C:/local/boost_1_59_0/lib32-msvc-14.0;C:/local/boost_1_59/lib32-msvc-14.1;C:/local/boost_1_59/lib32-msvc-14.0;C:/local/boost_1_58_0/lib32-msvc-14.1;C:/local/boost_1_58_0/lib32-msvc-14.0;C:/local/boost_1_58/lib32-msvc-14.1;C:/local/boost_1_58/lib32-msvc-14.0;C:/local/boost_1_57_0/lib32-msvc-14.1;C:/local/boost_1_57_0/lib32-msvc-14.0;C:/local/boost_1_57/lib32-msvc-14.1;C:/local/boost_1_57/lib32-msvc-14.0;C:/local/boost_1_56_0/lib32-msvc-14.1;C:/local/boost_1_56_0/lib32-msvc-14.0;C:/local/boost_1_56/lib32-msvc-14.1;C:/local/boost_1_56/lib32-msvc-14.0;C:/local/boost_1_55_0/lib32-msvc-14.1;C:/local/boost_1_55_0/lib32-msvc-14.0;C:/local/boost_1_55/lib32-msvc-14.1;C:/local/boost_1_55/lib32-msvc-14.0;C:/local/boost_1_54_0/lib32-msvc-14.1;C:/local/boost_1_54_0/lib32-msvc-14.0;C:/local/boost_1_54/lib32-msvc-14.1;C:/local/boost_1_54/lib32-msvc-14.0;C:/local/boost_1_53_0/lib32-msvc-14.1;C:/local/boost_1_53_0/lib32-msvc-14.0;C:/local/boost_1_53/lib32-msvc-14.1;C:/local/boost_1_53/lib32-msvc-14.0;C:/local/boost_1_52_0/lib32-msvc-14.1;C:/local/boost_1_52_0/lib32-msvc-14.0;C:/local/boost_1_52/lib32-msvc-14.1;C:/local/boost_1_52/lib32-msvc-14.0;C:/local/boost_1_51_0/lib32-msvc-14.1;C:/local/boost_1_51_0/lib32-msvc-14.0;C:/local/boost_1_51/lib32-msvc-14.1;C:/local/boost_1_51/lib32-msvc-14.0;C:/local/boost_1_50_0/lib32-msvc-14.1;C:/local/boost_1_50_0/lib32-msvc-14.0;C:/local/boost_1_50/lib32-msvc-14.1;C:/local/boost_1_50/lib32-msvc-14.0;C:/local/boost_1_49_0/lib32-msvc-14.1;C:/local/boost_1_49_0/lib32-msvc-14.0;C:/local/boost_1_49/lib32-msvc-14.1;C:/local/boost_1_49/lib32-msvc-14.0;C:/local/boost_1_48_0/lib32-msvc-14.1;C:/local/boost_1_48_0/lib32-msvc-14.0;C:/local/boost_1_48/lib32-msvc-14.1;C:/local/boost_1_48/lib32-msvc-14.0;C:/local/boost_1_47_0/lib32-msvc-14.1;C:/local/boost_1_47_0/lib32-msvc-14.0;C:/local/boost_1_47/lib32-msvc-14.1;C:/local/boost_1_47/lib32-msvc-14.0;C:/local/boost_1_46_1/lib32-msvc-14.1;C:/local/boost_1_46_1/lib32-msvc-14.0;C:/local/boost_1_46_0/lib32-msvc-14.1;C:/local/boost_1_46_0/lib32-msvc-14.0;C:/local/boost_1_46/lib32-msvc-14.1;C:/local/boost_1_46/lib32-msvc-14.0;C:/local/boost_1_45_0/lib32-msvc-14.1;C:/local/boost_1_45_0/lib32-msvc-14.0;C:/local/boost_1_45/lib32-msvc-14.1;C:/local/boost_1_45/lib32-msvc-14.0;C:/local/boost_1_44_0/lib32-msvc-14.1;C:/local/boost_1_44_0/lib32-msvc-14.0;C:/local/boost_1_44/lib32-msvc-14.1;C:/local/boost_1_44/lib32-msvc-14.0;C:/local/boost_1_43_0/lib32-msvc-14.1;C:/local/boost_1_43_0/lib32-msvc-14.0;C:/local/boost_1_43/lib32-msvc-14.1;C:/local/boost_1_43/lib32-msvc-14.0;C:/local/boost_1_42_0/lib32-msvc-14.1;C:/local/boost_1_42_0/lib32-msvc-14.0;C:/local/boost_1_42/lib32-msvc-14.1;C:/local/boost_1_42/lib32-msvc-14.0;C:/local/boost_1_41_0/lib32-msvc-14.1;C:/local/boost_1_41_0/lib32-msvc-14.0;C:/local/boost_1_41/lib32-msvc-14.1;C:/local/boost_1_41/lib32-msvc-14.0;C:/local/boost_1_40_0/lib32-msvc-14.1;C:/local/boost_1_40_0/lib32-msvc-14.0;C:/local/boost_1_40/lib32-msvc-14.1;C:/local/boost_1_40/lib32-msvc-14.0;C:/local/boost_1_39_0/lib32-msvc-14.1;C:/local/boost_1_39_0/lib32-msvc-14.0;C:/local/boost_1_39/lib32-msvc-14.1;C:/local/boost_1_39/lib32-msvc-14.0;C:/local/boost_1_38_0/lib32-msvc-14.1;C:/local/boost_1_38_0/lib32-msvc-14.0;C:/local/boost_1_38/lib32-msvc-14.1;C:/local/boost_1_38/lib32-msvc-14.0;C:/local/boost_1_37_0/lib32-msvc-14.1;C:/local/boost_1_37_0/lib32-msvc-14.0;C:/local/boost_1_37/lib32-msvc-14.1;C:/local/boost_1_37/lib32-msvc-14.0;C:/local/boost_1_36_1/lib32-msvc-14.1;C:/local/boost_1_36_1/lib32-msvc-14.0;C:/local/boost_1_36_0/lib32-msvc-14.1;C:/local/boost_1_36_0/lib32-msvc-14.0;C:/local/boost_1_36/lib32-msvc-14.1;C:/local/boost_1_36/lib32-msvc-14.0;C:/local/boost_1_35_1/lib32-msvc-14.1;C:/local/boost_1_35_1/lib32-msvc-14.0;C:/local/boost_1_35_0/lib32-msvc-14.1;C:/local/boost_1_35_0/lib32-msvc-14.0;C:/local/boost_1_35/lib32-msvc-14.1;C:/local/boost_1_35/lib32-msvc-14.0;C:/local/boost_1_34_1/lib32-msvc-14.1;C:/local/boost_1_34_1/lib32-msvc-14.0;C:/local/boost_1_34_0/lib32-msvc-14.1;C:/local/boost_1_34_0/lib32-msvc-14.0;C:/local/boost_1_34/lib32-msvc-14.1;C:/local/boost_1_34/lib32-msvc-14.0;C:/local/boost_1_33_1/lib32-msvc-14.1;C:/local/boost_1_33_1/lib32-msvc-14.0;C:/local/boost_1_33_0/lib32-msvc-14.1;C:/local/boost_1_33_0/lib32-msvc-14.0;C:/local/boost_1_33/lib32-msvc-14.1;C:/local/boost_1_33/lib32-msvc-14.0;C:/boost/lib32-msvc-14.1;C:/boost/lib32-msvc-14.0;PATHS;C:/boost/lib;C:/boost;/sw/local/lib_boost_LIBRARY_SEARCH_DIRS_DEBUG = C:/Program Files (x86)/boost/boost_1_66_0/lib;C:/Program Files (x86)/boost/boost_1_66_0/stage/lib;C:/Program Files (x86)/boost/boost_1_66_0/lib32-msvc-14.1;C:/Program Files (x86)/boost/boost_1_66_0/lib32-msvc-14.0;C:/Program Files (x86)/boost/boost_1_66_0/lib;C:/Program Files (x86)/boost/boost_1_66_0/../lib;C:/Program Files (x86)/boost/boost_1_66_0/stage/lib;C:/Program Files (x86)/boost/boost_1_66_0/../lib32-msvc-14.1;C:/Program Files (x86)/boost/boost_1_66_0/../lib32-msvc-14.0;C:/local/boost_1_65_1/lib32-msvc-14.1;C:/local/boost_1_65_1/lib32-msvc-14.0;C:/local/boost_1_65_0/lib32-msvc-14.1;C:/local/boost_1_65_0/lib32-msvc-14.0;C:/local/boost_1_65/lib32-msvc-14.1;C:/local/boost_1_65/lib32-msvc-14.0;C:/local/boost_1_64_0/lib32-msvc-14.1;C:/local/boost_1_64_0/lib32-msvc-14.0;C:/local/boost_1_64/lib32-msvc-14.1;C:/local/boost_1_64/lib32-msvc-14.0;C:/local/boost_1_63_0/lib32-msvc-14.1;C:/local/boost_1_63_0/lib32-msvc-14.0;C:/local/boost_1_63/lib32-msvc-14.1;C:/local/boost_1_63/lib32-msvc-14.0;C:/local/boost_1_62_0/lib32-msvc-14.1;C:/local/boost_1_62_0/lib32-msvc-14.0;C:/local/boost_1_62/lib32-msvc-14.1;C:/local/boost_1_62/lib32-msvc-14.0;C:/local/boost_1_61_0/lib32-msvc-14.1;C:/local/boost_1_61_0/lib32-msvc-14.0;C:/local/boost_1_61/lib32-msvc-14.1;C:/local/boost_1_61/lib32-msvc-14.0;C:/local/boost_1_60_0/lib32-msvc-14.1;C:/local/boost_1_60_0/lib32-msvc-14.0;C:/local/boost_1_60/lib32-msvc-14.1;C:/local/boost_1_60/lib32-msvc-14.0;C:/local/boost_1_59_0/lib32-msvc-14.1;C:/local/boost_1_59_0/lib32-msvc-14.0;C:/local/boost_1_59/lib32-msvc-14.1;C:/local/boost_1_59/lib32-msvc-14.0;C:/local/boost_1_58_0/lib32-msvc-14.1;C:/local/boost_1_58_0/lib32-msvc-14.0;C:/local/boost_1_58/lib32-msvc-14.1;C:/local/boost_1_58/lib32-msvc-14.0;C:/local/boost_1_57_0/lib32-msvc-14.1;C:/local/boost_1_57_0/lib32-msvc-14.0;C:/local/boost_1_57/lib32-msvc-14.1;C:/local/boost_1_57/lib32-msvc-14.0;C:/local/boost_1_56_0/lib32-msvc-14.1;C:/local/boost_1_56_0/lib32-msvc-14.0;C:/local/boost_1_56/lib32-msvc-14.1;C:/local/boost_1_56/lib32-msvc-14.0;C:/local/boost_1_55_0/lib32-msvc-14.1;C:/local/boost_1_55_0/lib32-msvc-14.0;C:/local/boost_1_55/lib32-msvc-14.1;C:/local/boost_1_55/lib32-msvc-14.0;C:/local/boost_1_54_0/lib32-msvc-14.1;C:/local/boost_1_54_0/lib32-msvc-14.0;C:/local/boost_1_54/lib32-msvc-14.1;C:/local/boost_1_54/lib32-msvc-14.0;C:/local/boost_1_53_0/lib32-msvc-14.1;C:/local/boost_1_53_0/lib32-msvc-14.0;C:/local/boost_1_53/lib32-msvc-14.1;C:/local/boost_1_53/lib32-msvc-14.0;C:/local/boost_1_52_0/lib32-msvc-14.1;C:/local/boost_1_52_0/lib32-msvc-14.0;C:/local/boost_1_52/lib32-msvc-14.1;C:/local/boost_1_52/lib32-msvc-14.0;C:/local/boost_1_51_0/lib32-msvc-14.1;C:/local/boost_1_51_0/lib32-msvc-14.0;C:/local/boost_1_51/lib32-msvc-14.1;C:/local/boost_1_51/lib32-msvc-14.0;C:/local/boost_1_50_0/lib32-msvc-14.1;C:/local/boost_1_50_0/lib32-msvc-14.0;C:/local/boost_1_50/lib32-msvc-14.1;C:/local/boost_1_50/lib32-msvc-14.0;C:/local/boost_1_49_0/lib32-msvc-14.1;C:/local/boost_1_49_0/lib32-msvc-14.0;C:/local/boost_1_49/lib32-msvc-14.1;C:/local/boost_1_49/lib32-msvc-14.0;C:/local/boost_1_48_0/lib32-msvc-14.1;C:/local/boost_1_48_0/lib32-msvc-14.0;C:/local/boost_1_48/lib32-msvc-14.1;C:/local/boost_1_48/lib32-msvc-14.0;C:/local/boost_1_47_0/lib32-msvc-14.1;C:/local/boost_1_47_0/lib32-msvc-14.0;C:/local/boost_1_47/lib32-msvc-14.1;C:/local/boost_1_47/lib32-msvc-14.0;C:/local/boost_1_46_1/lib32-msvc-14.1;C:/local/boost_1_46_1/lib32-msvc-14.0;C:/local/boost_1_46_0/lib32-msvc-14.1;C:/local/boost_1_46_0/lib32-msvc-14.0;C:/local/boost_1_46/lib32-msvc-14.1;C:/local/boost_1_46/lib32-msvc-14.0;C:/local/boost_1_45_0/lib32-msvc-14.1;C:/local/boost_1_45_0/lib32-msvc-14.0;C:/local/boost_1_45/lib32-msvc-14.1;C:/local/boost_1_45/lib32-msvc-14.0;C:/local/boost_1_44_0/lib32-msvc-14.1;C:/local/boost_1_44_0/lib32-msvc-14.0;C:/local/boost_1_44/lib32-msvc-14.1;C:/local/boost_1_44/lib32-msvc-14.0;C:/local/boost_1_43_0/lib32-msvc-14.1;C:/local/boost_1_43_0/lib32-msvc-14.0;C:/local/boost_1_43/lib32-msvc-14.1;C:/local/boost_1_43/lib32-msvc-14.0;C:/local/boost_1_42_0/lib32-msvc-14.1;C:/local/boost_1_42_0/lib32-msvc-14.0;C:/local/boost_1_42/lib32-msvc-14.1;C:/local/boost_1_42/lib32-msvc-14.0;C:/local/boost_1_41_0/lib32-msvc-14.1;C:/local/boost_1_41_0/lib32-msvc-14.0;C:/local/boost_1_41/lib32-msvc-14.1;C:/local/boost_1_41/lib32-msvc-14.0;C:/local/boost_1_40_0/lib32-msvc-14.1;C:/local/boost_1_40_0/lib32-msvc-14.0;C:/local/boost_1_40/lib32-msvc-14.1;C:/local/boost_1_40/lib32-msvc-14.0;C:/local/boost_1_39_0/lib32-msvc-14.1;C:/local/boost_1_39_0/lib32-msvc-14.0;C:/local/boost_1_39/lib32-msvc-14.1;C:/local/boost_1_39/lib32-msvc-14.0;C:/local/boost_1_38_0/lib32-msvc-14.1;C:/local/boost_1_38_0/lib32-msvc-14.0;C:/local/boost_1_38/lib32-msvc-14.1;C:/local/boost_1_38/lib32-msvc-14.0;C:/local/boost_1_37_0/lib32-msvc-14.1;C:/local/boost_1_37_0/lib32-msvc-14.0;C:/local/boost_1_37/lib32-msvc-14.1;C:/local/boost_1_37/lib32-msvc-14.0;C:/local/boost_1_36_1/lib32-msvc-14.1;C:/local/boost_1_36_1/lib32-msvc-14.0;C:/local/boost_1_36_0/lib32-msvc-14.1;C:/local/boost_1_36_0/lib32-msvc-14.0;C:/local/boost_1_36/lib32-msvc-14.1;C:/local/boost_1_36/lib32-msvc-14.0;C:/local/boost_1_35_1/lib32-msvc-14.1;C:/local/boost_1_35_1/lib32-msvc-14.0;C:/local/boost_1_35_0/lib32-msvc-14.1;C:/local/boost_1_35_0/lib32-msvc-14.0;C:/local/boost_1_35/lib32-msvc-14.1;C:/local/boost_1_35/lib32-msvc-14.0;C:/local/boost_1_34_1/lib32-msvc-14.1;C:/local/boost_1_34_1/lib32-msvc-14.0;C:/local/boost_1_34_0/lib32-msvc-14.1;C:/local/boost_1_34_0/lib32-msvc-14.0;C:/local/boost_1_34/lib32-msvc-14.1;C:/local/boost_1_34/lib32-msvc-14.0;C:/local/boost_1_33_1/lib32-msvc-14.1;C:/local/boost_1_33_1/lib32-msvc-14.0;C:/local/boost_1_33_0/lib32-msvc-14.1;C:/local/boost_1_33_0/lib32-msvc-14.0;C:/local/boost_1_33/lib32-msvc-14.1;C:/local/boost_1_33/lib32-msvc-14.0;C:/boost/lib32-msvc-14.1;C:/boost/lib32-msvc-14.0;PATHS;C:/boost/lib;C:/boost;/sw/local/lib
CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:18 (find_package)
CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1610 (message):
No header defined for property_tree; skipping header check
Call Stack (most recent call first):
CMakeLists.txt:18 (find_package)
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1641 ] Searching for PROPERTY_TREE_LIBRARY_RELEASE: boost_property_tree-vc141-mt-1_66;boost_property_tree-vc141-mt;boost_property_tree-vc140-mt-1_66;boost_property_tree-vc140-mt;boost_property_tree-mt-1_66;boost_property_tree-mt;boost_property_tree
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1692 ] Searching for PROPERTY_TREE_LIBRARY_DEBUG: boost_property_tree-vc141-mt-gd-1_66;boost_property_tree-vc141-mt-gd;boost_property_tree-vc140-mt-gd-1_66;boost_property_tree-vc140-mt-gd;boost_property_tree-mt-gd-1_66;boost_property_tree-mt-gd;boost_property_tree-mt;boost_property_tree
[ C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1767 ] Boost_FOUND = 1
CMake Error at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1928 (message):
Unable to find the requested Boost libraries.
Boost version: 1.66.0
Boost include path: C:/Program Files (x86)/boost/boost_1_66_0
Could not find the following Boost libraries:
boost_property_tree
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):
CMakeLists.txt:18 (find_package)
Any idea of what I am doing wrong ?

CMake is unable to find boost_asio

I am trying to install and use Boost 1.60.0 in my new C++ project. (I use Ubuntu, CLion and CMake for developing and building).
What have I done?
I downloaded Boost from the link provided on the website.
Extracted into /devenv/boost160 (/devenv/boost160 is the root, after I renamed the original folder)
I ran ./bootstrap.sh from /devenv/boost160 (everything went ok; according to their official documentation, running this without arguments, takes the output into /usr/local) and it went smoothly.
I created a CLion project and added the following to CMakeLists.txt.
set(BOOST_ROOT /usr/local/include/boost)
set(BOOST_LIBRARYDIR /usr/local/lib)
set(Boost_USE_MULTITHREAD ON)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_DEBUG ON)
find_package(Boost 1.60.0 REQUIRED COMPONENTS asio date_time)
IF (Boost_FOUND)
include_directories(${Boost_INCLUDE_DIR})
endif()
I ran the CLion's Build command and I got the following output, basically saying that it's unable to find boost_asio.
/devenv/clion-1.1/bin/cmake/bin/cmake --build /home/victor/.clion11/system/cmake/generated/50ae3d2f/50ae3d2f/Debug0 --target all -- -j 8
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:549 ] _boost_TEST_VERSIONS =
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:551 ] Boost_USE_MULTITHREADED = TRUE
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:553 ] Boost_USE_STATIC_LIBS = ON
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:555 ] Boost_USE_STATIC_RUNTIME = ON
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:557 ] Boost_ADDITIONAL_VERSIONS =
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:559 ] Boost_NO_SYSTEM_PATHS =
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:611 ] Declared as CMake or Environmental Variables:
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:613 ] BOOST_ROOT = /usr/local/include/boost
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:615 ] BOOST_INCLUDEDIR =
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:617 ] BOOST_LIBRARYDIR = /usr/local/lib
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:619 ] _boost_TEST_VERSIONS =
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:712 ] location of version.hpp: /usr/local/include/boost/version.hpp
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:736 ] version.hpp reveals boost 1.60.0
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:822 ] guessed _boost_COMPILER = -gcc48
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:832 ] _boost_MULTITHREADED = -mt
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:875 ] _boost_RELEASE_ABI_TAG = -s
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:877 ] _boost_DEBUG_ABI_TAG = -sd
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:931 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = /usr/lib/x86_64-linux-gnu;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH_boost_LIBRARY_SEARCH_DIRS_DEBUG = /usr/lib/x86_64-linux-gnu;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:1043 ] Searching for ASIO_LIBRARY_RELEASE: boost_asio-gcc48-mt-s-1_60;boost_asio-gcc48-mt-s;boost_asio-mt-s-1_60;boost_asio-mt-s;boost_asio
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:343 ] Boost_LIBRARY_DIR_RELEASE = /usr/lib/x86_64-linux-gnu _boost_LIBRARY_SEARCH_DIRS_RELEASE = /usr/lib/x86_64-linux-gnu;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:1085 ] Searching for ASIO_LIBRARY_DEBUG: boost_asio-gcc48-mt-sd-1_60;boost_asio-gcc48-mt-sd;boost_asio-mt-sd-1_60;boost_asio-mt-sd;boost_asio-mt;boost_asio
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:343 ] Boost_LIBRARY_DIR_DEBUG = /usr/lib/x86_64-linux-gnu _boost_LIBRARY_SEARCH_DIRS_DEBUG = /usr/lib/x86_64-linux-gnu;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:1043 ] Searching for DATE_TIME_LIBRARY_RELEASE: boost_date_time-gcc48-mt-s-1_60;boost_date_time-gcc48-mt-s;boost_date_time-mt-s-1_60;boost_date_time-mt-s;boost_date_time
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:343 ] Boost_LIBRARY_DIR_RELEASE = /usr/lib/x86_64-linux-gnu _boost_LIBRARY_SEARCH_DIRS_RELEASE = /usr/lib/x86_64-linux-gnu;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:1085 ] Searching for DATE_TIME_LIBRARY_DEBUG: boost_date_time-gcc48-mt-sd-1_60;boost_date_time-gcc48-mt-sd;boost_date_time-mt-sd-1_60;boost_date_time-mt-sd;boost_date_time-mt;boost_date_time
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:343 ] Boost_LIBRARY_DIR_DEBUG = /usr/lib/x86_64-linux-gnu _boost_LIBRARY_SEARCH_DIRS_DEBUG = /usr/lib/x86_64-linux-gnu;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:1151 ] Boost_FOUND = 1
CMake Error at /devenv/clion-1.1/bin/cmake/share/cmake-3.3/Modules/FindBoost.cmake:1245 (message):
Unable to find the requested Boost libraries.
Boost version: 1.60.0
Boost include path: /usr/local/include
Could not find the following static Boost libraries:
boost_asio
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
CMakeLists.txt:12 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/victor/.clion11/system/cmake/generated/50ae3d2f/50ae3d2f/Debug0/CMakeFiles/CMakeOutput.log".
make: *** [cmake_check_build_system] Error 1
How can I use Boost 1.60.0 in my project given my configuration? Thank you!
Boost.Asio is a header-only library. The standard CMake function to locate Boost components (FindBoost.cmake) considers only components with pre-built libraries as components, assuming that the header-only components are installed completed with the rest of Boost headers. So you should use find_package(Boost 1.60.0 REQUIRED date_time) (date_time actually has pre-built library and can be located by the FindBoost.cmake).
I'd say that FindBoost.cmake could be enhanced to hide difference between header-only libraries and the real, pre-built ones for application developers. But right now it's the responsibility of the latters.
Edit Regarding the error with system_category: you need Boost.System library as well, so the find_package invocation should look like find_package(Boost 1.60.0 REQUIRED date_time system) and then use Boost_SYSTEM_LIBRARY in target_link_libraries. Unfortunately it seems that Boost still uses it's own implementation of system_category while the latter was standardized in C++11

CMake is not finding Boost

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, I get the following output:
CMake Error at D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1192 (message):
Unable to find the requested Boost libraries.
Boost version: 1.51.0
Boost include path: D:/program files/boost_1_51
The following Boost libraries could not be found:
boost_thread
boost_system
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/modules/CGAL_SetupBoost.cmake:6 (find_package)
cmake/modules/CGAL_SetupDependencies.cmake:85 (include)
CMakeLists.txt:590 (include)
But I did set up BOOST_ROOT, in CMake's GUI, to D:/program files/boost_1_51, which exists. And the two libraries it mentions are definitely installed. What is happening here? What do I need to do?
Attached is the output when running cmake -DBoost_DEBUG=ON:
D:\program files\CGAL-4.1>cmake -DBoost_DEBUG=ON
== Setting paths ==
-- Build CGAL from release in directory CGAL-4.1
-- Packagenames: CGAL-4.1
== Setting paths (DONE) ==
== Generate version files ==
-- CGAL_MAJOR_VERSION=4
-- CGAL_MINOR_VERSION=1
-- CGAL_BUGFIX_VERSION=0
-- CGAL_SONAME_VERSION=10
-- CGAL_SOVERSION =10.0.0
-- CGAL_REFERENCE_CACHE_DIR=
-- Building shared libraries
-- Targetting Visual Studio 10 Win64
-- Target build enviroment supports auto-linking
-- Using VC10 compiler.
-- Generator uses intermediate configuration directory: $(Configuration)
-- USING CMake version: 2.8.10
-- System: Windows
== Generate version files (DONE) ==
== Set up flags ==
-- Build type: Release
-- USING CXXFLAGS = ' /DWIN32 /D_WINDOWS /W3 /Zm1000 /GR /EHsc -D_CRT_SECURE_NO_
DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_
WARNINGS /fp:strict /fp:except- /MD /O2 /Ob2 /D NDEBUG'
-- USING LDFLAGS = ' /STACK:10000000 /machine:x64 /INCREMENTAL:NO'
== Set up flags (DONE) ==
== Detect external libraries ==
-- External libraries supported: GMP;MPFR;ZLIB;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;TA
UCS;Eigen3;BLAS;LAPACK;QGLViewer;ESBTL;Coin3D;NTL;IPE
-- Preconfiguring library: GMP ...
-- GMP has been preconfigured:
-- CGAL_UseGMP-file:
-- GMP include: D:/program files/CGAL-4.1/auxiliary/gmp/include
-- GMP libraries: D:/program files/CGAL-4.1/auxiliary/gmp/lib/libgmp-10.lib
-- GMP definitions:
-- USING GMP_VERSION = '5.0.1'
-- Preconfiguring library: MPFR ...
-- MPFR has been preconfigured:
-- CGAL_UseMPFR-file:
-- MPFR include: D:/program files/CGAL-4.1/auxiliary/gmp/include
-- MPFR libraries: D:/program files/CGAL-4.1/auxiliary/gmp/lib/libmpfr-4.li
b
-- MPFR definitions:
-- USING MPFR_VERSION = '3.0.0'
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:566 ] _b
oost_TEST_VERSIONS = 1.56.1;1.56.0;1.56;1.55.1;1.55.0;1.55;1.54.1;1.54.0;1.54;1.
53.1;1.53.0;1.53;1.52.1;1.52.0;1.52;1.51.1;1.51.0;1.51;1.50.1;1.50.0;1.50;1.49.1
;1.49.0;1.49;1.48.1;1.48.0;1.48;1.47.1;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.1;1.4
5.0;1.45;1.44.1;1.44.0;1.44;1.43.1;1.43.0;1.43;1.42.1;1.42.0;1.42;1.41.1;1.41.0;
1.41;1.40.1;1.40.0;1.40;1.39.1;1.39.0;1.39;1.38.1;1.38.0;1.38;1.37.1;1.37.0;1.37
;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;
1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1
.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37
.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:568 ] Bo
ost_USE_MULTITHREADED = TRUE
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:570 ] Bo
ost_USE_STATIC_LIBS = OFF
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:572 ] Bo
ost_USE_STATIC_RUNTIME =
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:574 ] Bo
ost_ADDITIONAL_VERSIONS = 1.56.1;1.56.0;1.56;1.55.1;1.55.0;1.55;1.54.1;1.54.0;1.
54;1.53.1;1.53.0;1.53;1.52.1;1.52.0;1.52;1.51.1;1.51.0;1.51;1.50.1;1.50.0;1.50;1
.49.1;1.49.0;1.49;1.48.1;1.48.0;1.48;1.47.1;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.
1;1.45.0;1.45;1.44.1;1.44.0;1.44;1.43.1;1.43.0;1.43;1.42.1;1.42.0;1.42;1.41.1;1.
41.0;1.41;1.40.1;1.40.0;1.40;1.39.1;1.39.0;1.39;1.38.1;1.38.0;1.38;1.37.1;1.37.0
;1.37
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:576 ] Bo
ost_NO_SYSTEM_PATHS =
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:644 ] De
clared as CMake or Environmental Variables:
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:646 ]
BOOST_ROOT = D:/program files/boost_1_51/bin
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:648 ]
BOOST_INCLUDEDIR =
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:650 ]
BOOST_LIBRARYDIR =
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:652 ] _b
oost_TEST_VERSIONS = 1.56.1;1.56.0;1.56;1.55.1;1.55.0;1.55;1.54.1;1.54.0;1.54;1.
53.1;1.53.0;1.53;1.52.1;1.52.0;1.52;1.51.1;1.51.0;1.51;1.50.1;1.50.0;1.50;1.49.1
;1.49.0;1.49;1.48.1;1.48.0;1.48;1.47.1;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.1;1.4
5.0;1.45;1.44.1;1.44.0;1.44;1.43.1;1.43.0;1.43;1.42.1;1.42.0;1.42;1.41.1;1.41.0;
1.41;1.40.1;1.40.0;1.40;1.39.1;1.39.0;1.39;1.38.1;1.38.0;1.38;1.37.1;1.37.0;1.37
;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;
1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1
.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37
.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:734 ] lo
cation of version.hpp: D:/program files/boost_1_51/boost/version.hpp
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:754 ] ve
rsion.hpp reveals boost 1.51.0
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:786 ] gu
essed _boost_COMPILER = -vc100
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:796 ] _b
oost_MULTITHREADED = -mt
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:839 ] _b
oost_RELEASE_ABI_TAG = -
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:841 ] _b
oost_DEBUG_ABI_TAG = -gd
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:884 ] _b
oost_LIBRARY_SEARCH_DIRS = 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:\Progr
am Files (x86)/boost/boost_1_51_0/lib;C:\Program Files (x86)/boost/boost_1_51/li
b;C:\Program Files (x86)/boost/lib;C:\Program Files (x86)/boost;/sw/local/lib
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:962 ] Se
arching for THREAD_LIBRARY_RELEASE: boost_thread-vc100-mt-1_51;boost_thread-vc10
0-mt;boost_thread-mt-1_51;boost_thread-mt;boost_thread
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:994 ] Se
arching for THREAD_LIBRARY_DEBUG: boost_thread-vc100-mt-gd-1_51;boost_thread-vc1
00-mt-gd;boost_thread-mt-gd-1_51;boost_thread-mt-gd;boost_thread-mt;boost_thread
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:962 ] Se
arching for SYSTEM_LIBRARY_RELEASE: boost_system-vc100-mt-1_51;boost_system-vc10
0-mt;boost_system-mt-1_51;boost_system-mt;boost_system
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:994 ] Se
arching for SYSTEM_LIBRARY_DEBUG: boost_system-vc100-mt-gd-1_51;boost_system-vc1
00-mt-gd;boost_system-mt-gd-1_51;boost_system-mt-gd;boost_system-mt;boost_system
-- [ D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1108 ] B
oost_FOUND = FALSE
CMake Error at D:/program files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmak
e:1192 (message):
Unable to find the requested Boost libraries.
Boost version: 1.51.0
Boost include path: D:/program files/boost_1_51
The following Boost libraries could not be found:
boost_thread
boost_system
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/modules/CGAL_SetupBoost.cmake:6 (find_package)
cmake/modules/CGAL_SetupDependencies.cmake:85 (include)
CMakeLists.txt:590 (include)
-- Boost include: D:/program files/boost_1_51
-- Boost libraries:
-- Boost definitions:
-- USING BOOST_VERSION = '1.51.0'
== Detect external libraries (DONE) ==
== Write compiler_config.h ==
== Write compiler_config.h (DONE) ==
== Generating build files ==
Configuring libCGAL
-- Requested component: MPFR
-- Requested component: GMP
libCGAL is configured
-- Sources for CGAL component library 'Core' detected
Configuring libCGAL_Core
-- Requested component: MPFR
-- Requested component: GMP
libCGAL_Core is configured
-- Sources for CGAL component library 'ImageIO' detected
Configuring libCGAL_ImageIO
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- OpenGL include:
-- OpenGL libraries: glu32;opengl32
-- Requested component: MPFR
-- Requested component: GMP
libCGAL_ImageIO is configured
-- NOTICE: CGAL_ImageIO needs ZLib to read compressed files. That feature will n
ot be activated.
-- Sources for CGAL component library 'Qt3' detected
Configuring libCGAL_Qt3
-- CGAL_Qt3 needs Qt3, cannot be configured.
-- Sources for CGAL component library 'Qt4' detected
Configuring libCGAL_Qt4
-- USING OPENGL_VERSION = '1.1'
-- USING QT4_VERSION = '4.8.3'
-- OpenGL include:
-- OpenGL libraries: glu32;opengl32
-- OpenGL definitions:
-- Qt4 include: D:/QT/include
-- Qt4 libraries: optimized;D:/QT/lib/qtmain.lib;debug;D:/QT/lib/qtmaind.li
b;optimized;D:/QT/lib/QtOpenGL4.lib;debug;D:/QT/lib/QtOpenGLd4.lib;optimized;D:/
QT/lib/QtGui4.lib;debug;D:/QT/lib/QtGuid4.lib;optimized;D:/QT/lib/QtCore4.lib;de
bug;D:/QT/lib/QtCored4.lib
-- Qt4 definitions: -DQT_DLL
-- moc executable: D:/QT/bin/moc.exe
-- uic executable: D:/QT/bin/uic.exe
-- Requested component: MPFR
-- Requested component: GMP
libCGAL_Qt4 is configured
-- Sources for CGAL component libraries 'CGAL;Core;ImageIO;Qt3;Qt4' detected
== Generating build files (DONE) ==
-- Configuring incomplete, errors occurred!
(I saw at least three questions with the same title as this question. Each of them had a different answer that worked for the OP, but not for me, so I am sorry to repeat the question...)
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.
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.
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.
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.
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.