Skip to content

Commit b3402c4

Browse files
Satish Kumarmeta-codesync[bot]
authored andcommitted
Add open source build system support
Summary: Add CMake and setup.py configuration for thrift-python OSS builds. This is the first step toward `getdeps.py build fbthrift-python`. Manifests and workflows follow in subsequent diffs. NOTE: To reduce cognitive load, the next change adds tests. Reviewed By: vitaut Differential Revision: D90828152 fbshipit-source-id: 31bd703f401fe151af5295176c15101f5a7407c0
1 parent ee21f9a commit b3402c4

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
find_path(LIBIBERTY_INCLUDE_DIR NAMES libiberty.h PATH_SUFFIXES libiberty)
16+
mark_as_advanced(LIBIBERTY_INCLUDE_DIR)
17+
18+
find_library(LIBIBERTY_LIBRARY NAMES iberty)
19+
mark_as_advanced(LIBIBERTY_LIBRARY)
20+
21+
include(FindPackageHandleStandardArgs)
22+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
23+
LIBIBERTY
24+
REQUIRED_VARS LIBIBERTY_LIBRARY LIBIBERTY_INCLUDE_DIR)
25+
26+
if(LIBIBERTY_FOUND)
27+
set(LIBIBERTY_LIBRARIES ${LIBIBERTY_LIBRARY})
28+
set(LIBIBERTY_INCLUDE_DIRS ${LIBIBERTY_INCLUDE_DIR})
29+
endif()

0 commit comments

Comments
 (0)