Skip to content

Commit

Permalink
fix(CMakeLists.txt): do not require boost::signals, which will be dep…
Browse files Browse the repository at this point in the history
…recated in Boost 1.69

Fixes #225.
We've been using signals2 library by default.
  • Loading branch information
lotem committed Oct 27, 2018
1 parent 19cea07 commit 8a9ef3b
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,20 @@ set(Boost_USE_MULTITHREADED ON)
if(MSVC)
set(Boost_USE_STATIC_RUNTIME ON)
endif()
find_package(Boost 1.46.0 REQUIRED COMPONENTS filesystem regex signals system locale)

if(NOT BOOST_USE_CXX11)
add_definitions("-DBOOST_NO_CXX11_SCOPED_ENUMS")
endif()

set(BOOST_COMPONENTS filesystem regex system locale)

if(BOOST_USE_SIGNALS2)
add_definitions("-DBOOST_SIGNALS2")
else()
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} singals)
endif()

find_package(Boost 1.46.0 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
Expand Down Expand Up @@ -136,14 +149,6 @@ if(UNIX)
add_definitions("-std=c++11")
endif()

if(NOT BOOST_USE_CXX11)
add_definitions("-DBOOST_NO_CXX11_SCOPED_ENUMS")
endif()

if(BOOST_USE_SIGNALS2)
add_definitions("-DBOOST_SIGNALS2")
endif()

if(NOT DEFINED LIB_INSTALL_DIR)
set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
endif()
Expand Down

0 comments on commit 8a9ef3b

Please sign in to comment.