Add boost include directories only if MSGPACK_BOOST is enabled

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
This commit is contained in:
Stefan Herbrechtsmeier 2017-02-24 14:09:14 +01:00
parent 99c4d37a39
commit 09e8833d53

View File

@ -92,20 +92,19 @@ OPTION (MSGPACK_BUILD_EXAMPLES "Build msgpack examples." ON)
IF (MSGPACK_BOOST)
SET (CMAKE_CXX_FLAGS "-DMSGPACK_USE_BOOST ${CMAKE_CXX_FLAGS}")
ENDIF ()
SET (Boost_USE_MULTITHREADED ON)
SET (Boost_USE_STATIC_RUNTIME OFF)
FIND_PACKAGE (Boost COMPONENTS chrono context timer system)
IF (Boost_INCLUDE_DIRS)
SET (Boost_USE_MULTITHREADED ON)
SET (Boost_USE_STATIC_RUNTIME OFF)
FIND_PACKAGE (Boost COMPONENTS chrono context timer system)
IF (Boost_INCLUDE_DIRS)
INCLUDE_DIRECTORIES (
${Boost_INCLUDE_DIRS}
)
ENDIF ()
IF (MSGPACK_BOOST_DIR)
ENDIF ()
IF (MSGPACK_BOOST_DIR)
INCLUDE_DIRECTORIES (
${MSGPACK_BOOST_DIR}
)
ENDIF ()
ENDIF ()
IF (MSGPACK_CHAR_SIGN)