Skip to content

Commit 8a9ef3b

Browse files
committed
fix(CMakeLists.txt): do not require boost::signals, which will be deprecated in Boost 1.69
Fixes #225. We've been using signals2 library by default.
1 parent 19cea07 commit 8a9ef3b

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

CMakeLists.txt

+14-9
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,20 @@ set(Boost_USE_MULTITHREADED ON)
4949
if(MSVC)
5050
set(Boost_USE_STATIC_RUNTIME ON)
5151
endif()
52-
find_package(Boost 1.46.0 REQUIRED COMPONENTS filesystem regex signals system locale)
52+
53+
if(NOT BOOST_USE_CXX11)
54+
add_definitions("-DBOOST_NO_CXX11_SCOPED_ENUMS")
55+
endif()
56+
57+
set(BOOST_COMPONENTS filesystem regex system locale)
58+
59+
if(BOOST_USE_SIGNALS2)
60+
add_definitions("-DBOOST_SIGNALS2")
61+
else()
62+
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} singals)
63+
endif()
64+
65+
find_package(Boost 1.46.0 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
5366
if(Boost_FOUND)
5467
include_directories(${Boost_INCLUDE_DIRS})
5568
link_directories(${Boost_LIBRARY_DIRS})
@@ -136,14 +149,6 @@ if(UNIX)
136149
add_definitions("-std=c++11")
137150
endif()
138151

139-
if(NOT BOOST_USE_CXX11)
140-
add_definitions("-DBOOST_NO_CXX11_SCOPED_ENUMS")
141-
endif()
142-
143-
if(BOOST_USE_SIGNALS2)
144-
add_definitions("-DBOOST_SIGNALS2")
145-
endif()
146-
147152
if(NOT DEFINED LIB_INSTALL_DIR)
148153
set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
149154
endif()

0 commit comments

Comments
 (0)