Skip to content

Commit

Permalink
Include folly_pic in the opensource installed targets
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #1006

Reviewed By: Orvid

Differential Revision: D13782299

Pulled By: calebmarchent

fbshipit-source-id: 7662c67a18c10a04d8d68e3f729da81c6df38336
  • Loading branch information
Caleb Marchent authored and facebook-github-bot committed Jan 31, 2019
1 parent 6db47e8 commit ff84138
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ target_compile_definitions(folly_base
$<TARGET_PROPERTY:folly_deps,INTERFACE_COMPILE_DEFINITIONS>
)

set(FOLLY_INSTALL_TARGETS folly folly_deps)

option(PYTHON_EXTENSIONS "Build Python Bindings for Folly, requires Cython" OFF)
if (PYTHON_EXTENSIONS)
# Compile folly such that it can be linked in to a shared library
Expand All @@ -236,6 +238,7 @@ if (PYTHON_EXTENSIONS)
$<TARGET_PROPERTY:folly_deps,INTERFACE_COMPILE_DEFINITIONS>
)
set_target_properties(folly_pic PROPERTIES POSITION_INDEPENDENT_CODE True)
list(APPEND FOLLY_INSTALL_TARGETS folly_pic)
endif ()

add_library(folly
Expand All @@ -245,7 +248,8 @@ apply_folly_compile_options_to_target(folly)

target_link_libraries(folly PUBLIC folly_deps)

install(TARGETS folly folly_deps

install(TARGETS ${FOLLY_INSTALL_TARGETS}
EXPORT folly
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
Expand Down

0 comments on commit ff84138

Please sign in to comment.