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) IF (MSGPACK_BOOST)
SET (CMAKE_CXX_FLAGS "-DMSGPACK_USE_BOOST ${CMAKE_CXX_FLAGS}") SET (CMAKE_CXX_FLAGS "-DMSGPACK_USE_BOOST ${CMAKE_CXX_FLAGS}")
ENDIF () SET (Boost_USE_MULTITHREADED ON)
SET (Boost_USE_STATIC_RUNTIME OFF)
SET (Boost_USE_MULTITHREADED ON) FIND_PACKAGE (Boost COMPONENTS chrono context timer system)
SET (Boost_USE_STATIC_RUNTIME OFF) IF (Boost_INCLUDE_DIRS)
FIND_PACKAGE (Boost COMPONENTS chrono context timer system) INCLUDE_DIRECTORIES (
IF (Boost_INCLUDE_DIRS) ${Boost_INCLUDE_DIRS}
INCLUDE_DIRECTORIES ( )
${Boost_INCLUDE_DIRS} ENDIF ()
) IF (MSGPACK_BOOST_DIR)
ENDIF () INCLUDE_DIRECTORIES (
IF (MSGPACK_BOOST_DIR) ${MSGPACK_BOOST_DIR}
INCLUDE_DIRECTORIES ( )
${MSGPACK_BOOST_DIR} ENDIF ()
)
ENDIF () ENDIF ()
IF (MSGPACK_CHAR_SIGN) IF (MSGPACK_CHAR_SIGN)