提交 628f5999 编写于 作者: A Alessandro Siniscalchi

[cmake] boost set in one place and removed unreachable code

上级 c78d0d04
......@@ -45,20 +45,6 @@ endif(USE_PCH)
list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libraries/fc/CMakeModules" )
SET(BOOST_COMPONENTS)
LIST(APPEND BOOST_COMPONENTS thread
date_time
system
filesystem
program_options
signals
serialization
chrono
unit_test_framework
context
locale)
SET( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
if(UNIX)
if(APPLE)
set(whole_archive_flag "-force_load")
......@@ -72,20 +58,24 @@ else()
set(no_whole_archive_flag "--no-whole-archive")
endif()
SET( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
IF( WIN32 )
SET(BOOST_ROOT $ENV{BOOST_ROOT})
set(Boost_USE_MULTITHREADED ON)
set(BOOST_ALL_DYN_LINK OFF) # force dynamic linking for all libraries
ENDIF(WIN32)
FIND_PACKAGE(Boost 1.64 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
# For Boost 1.53 on windows, coroutine was not in BOOST_LIBRARYDIR and do not need it to build, but if boost versin >= 1.54, find coroutine otherwise will cause link errors
IF(NOT "${Boost_VERSION}" MATCHES "1.53(.*)")
SET(BOOST_LIBRARIES_TEMP ${Boost_LIBRARIES})
FIND_PACKAGE(Boost 1.54 REQUIRED COMPONENTS coroutine)
LIST(APPEND BOOST_COMPONENTS coroutine)
SET(Boost_LIBRARIES ${BOOST_LIBRARIES_TEMP} ${Boost_LIBRARIES})
ENDIF()
FIND_PACKAGE(Boost 1.64 REQUIRED COMPONENTS
thread
date_time
system
filesystem
program_options
signals
serialization
chrono
unit_test_framework
context
locale)
if( WIN32 )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册