diff --git a/cmake/print_include_directories.cmake b/cmake/print_include_directories.cmake index 4943f1e2afc..83b8064d262 100644 --- a/cmake/print_include_directories.cmake +++ b/cmake/print_include_directories.cmake @@ -7,8 +7,10 @@ list(APPEND dirs ${dirs1}) get_property (dirs1 TARGET common PROPERTY INCLUDE_DIRECTORIES) list(APPEND dirs ${dirs1}) -get_property (dirs1 TARGET ${Boost_PROGRAM_OPTIONS_LIBRARY} PROPERTY INCLUDE_DIRECTORIES) -list(APPEND dirs ${dirs1}) +if (USE_INTERNAL_BOOST_LIBRARY) + get_property (dirs1 TARGET ${Boost_PROGRAM_OPTIONS_LIBRARY} PROPERTY INCLUDE_DIRECTORIES) + list(APPEND dirs ${dirs1}) +endif () list(REMOVE_DUPLICATES dirs) file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/include_directories.txt "")