Commit bf255392 authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

cmake: define interface include directories

Summary:
Define interface include directories for the folly target.

This lets downstream dependencies of folly list Folly::folly in
target_link_libraries() and have the correct include directories be
added automatically.

Reviewed By: yfeldblum

Differential Revision: D7162335

fbshipit-source-id: 2a6aad57142e038450fd35a94446f5b865029155
parent 853e5e42
......@@ -267,12 +267,20 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp
DEPENDS folly_base folly_fingerprint
)
add_library(folly ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp $<TARGET_OBJECTS:folly_base>)
add_library(folly
${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp
$<TARGET_OBJECTS:folly_base>
)
apply_folly_compile_options_to_target(folly)
source_group("" FILES ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp)
target_link_libraries(folly PUBLIC ${FOLLY_LINK_LIBRARIES})
target_include_directories(folly PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
target_include_directories(folly
INTERFACE
${FOLLY_INCLUDE_DIRECTORIES}
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<INSTALL_INTERFACE:include>
)
install(TARGETS folly
EXPORT folly
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment