From 09e8833d53e29270f07f40d7e9096b77b648edfe Mon Sep 17 00:00:00 2001 From: Stefan Herbrechtsmeier Date: Fri, 24 Feb 2017 14:09:14 +0100 Subject: [PATCH] Add boost include directories only if MSGPACK_BOOST is enabled Signed-off-by: Stefan Herbrechtsmeier --- CMakeLists.txt | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ce7858f..5fb38506 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) - INCLUDE_DIRECTORIES ( - ${Boost_INCLUDE_DIRS} - ) -ENDIF () -IF (MSGPACK_BOOST_DIR) - INCLUDE_DIRECTORIES ( - ${MSGPACK_BOOST_DIR} - ) + 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) + INCLUDE_DIRECTORIES ( + ${MSGPACK_BOOST_DIR} + ) + ENDIF () ENDIF () IF (MSGPACK_CHAR_SIGN)