Commit 0c5ceda6 authored by Hasnain Lakhani's avatar Hasnain Lakhani Committed by Facebook Github Bot

Add CMake option to fetch deps statically

Summary:
We would like to build a version of proxygen that has minimal
dependencies on dynamic libraries.

Reviewed By: yfeldblum

Differential Revision: D17228181

fbshipit-source-id: cfd61afdfa978c49a536184f426502196241fb8a
parent 88e03cf4
...@@ -54,6 +54,9 @@ option(BUILD_SHARED_LIBS ...@@ -54,6 +54,9 @@ option(BUILD_SHARED_LIBS
mark_as_advanced(BUILD_SHARED_LIBS) mark_as_advanced(BUILD_SHARED_LIBS)
set(FOLLY_SUPPORT_SHARED_LIBRARY "${BUILD_SHARED_LIBS}") set(FOLLY_SUPPORT_SHARED_LIBRARY "${BUILD_SHARED_LIBS}")
include(FBBuildOptions)
fb_activate_static_library_option()
if(CMAKE_SYSTEM_NAME STREQUAL "Windows") if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
# Check target architecture # Check target architecture
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8) if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
......
function (fb_activate_static_library_option)
option(USE_STATIC_DEPS_ON_UNIX
"If enabled, use static dependencies on unix systems. This is generally discouraged."
OFF
)
# Mark USE_STATIC_DEPS_ON_UNIX as an "advanced" option, since enabling it
# is generally discouraged.
mark_as_advanced(USE_STATIC_DEPS_ON_UNIX)
if(UNIX AND USE_STATIC_DEPS_ON_UNIX)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE)
endif()
endfunction()
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
name = fizz name = fizz
fbsource_path = fbcode/fizz fbsource_path = fbcode/fizz
shipit_project = fizz shipit_project = fizz
shipit_fbcode_builder = true
[git] [git]
repo_url = https://github.com/facebookincubator/fizz.git repo_url = https://github.com/facebookincubator/fizz.git
......
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