mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 06:18:07 +03:00
add shared library support to add_fbthrift_cpp_library
Summary: `add_fbthrift_cpp_library` should honor `BUILD_SHARED_LIBS`, and call `add_library` with the right setting (`SHARED` if enabled, `STATIC` otherwise) Reviewed By: yns88 Differential Revision: D24911124 fbshipit-source-id: 79df7640a758a592a3df3e9e79bb129dd57f2d47
This commit is contained in:
parent
375b1b1cf0
commit
a00ee9ffee
@ -127,8 +127,14 @@ function(add_fbthrift_cpp_library LIB_NAME THRIFT_FILE)
|
||||
)
|
||||
|
||||
# Now emit the library rule to compile the sources
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set(LIB_TYPE SHARED)
|
||||
else ()
|
||||
set(LIB_TYPE STATIC)
|
||||
endif ()
|
||||
|
||||
add_library(
|
||||
"${LIB_NAME}" STATIC
|
||||
"${LIB_NAME}" ${LIB_TYPE}
|
||||
${generated_sources}
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user