Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include folly_pic in the opensource installed targets #1006

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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