Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ target_include_directories(fb303 PUBLIC
)

target_link_libraries(fb303
fb303_thrift_cpp
fb303_core_cpp
Folly::folly
FBThrift::thrift
)
Expand Down
24 changes: 15 additions & 9 deletions fb303/thrift/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,50 @@
# limitations under the License.

if (PYTHON_EXTENSIONS)
set(FB303_LANG cpp py)
set(FB303_LANG cpp py py3)
else ()
set(FB303_LANG cpp)
endif ()

add_fbthrift_library(
fb303_thrift
fb303_core
fb303_core.thrift
LANGUAGES ${FB303_LANG}
THRIFT_INCLUDE_DIR "${INCLUDE_INSTALL_DIR}/thrift-files"
SERVICES
BaseService
)
if (BUILD_SHARED_LIBS)
set_property(TARGET fb303_thrift_cpp PROPERTY VERSION ${PACKAGE_VERSION})
set_property(TARGET fb303_core_cpp PROPERTY VERSION ${PACKAGE_VERSION})
endif ()

install(
TARGETS fb303_thrift_cpp
TARGETS fb303_core_cpp
EXPORT fb303-exports
LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
PUBLIC_HEADER DESTINATION
"$<TARGET_PROPERTY:fb303_thrift_cpp,HEADER_INSTALL_DIR>"
"$<TARGET_PROPERTY:fb303_core_cpp,HEADER_INSTALL_DIR>"
)
install(
TARGETS fb303_thrift_cpp.thrift_includes
TARGETS fb303_core_cpp.thrift_includes
EXPORT fb303-exports
)
install(
FILES fb303_core.thrift
DESTINATION "$<TARGET_PROPERTY:fb303_thrift_cpp,THRIFT_INSTALL_DIR>"
DESTINATION "$<TARGET_PROPERTY:fb303_core_cpp,THRIFT_INSTALL_DIR>"
)

if (PYTHON_EXTENSIONS)
install_fb_python_library(fb303_thrift_py EXPORT fb303-exports)
install_fb_python_library(fb303_core_py EXPORT fb303-exports)
install(
TARGETS fb303_thrift_py.thrift_includes
TARGETS fb303_core_py.thrift_includes
EXPORT fb303-exports
)

install_fb_python_library(fb303_core_py3 EXPORT fb303-exports)
install(
TARGETS fb303_core_py3.thrift_includes
EXPORT fb303-exports
)
endif ()
Loading