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

Use cmake #47

Merged
merged 3 commits into from
Feb 24, 2020
Merged
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
24 changes: 9 additions & 15 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,16 @@ fi
export CPPFLAGS="${CPPFLAGS} -I${PREFIX}/include"
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib"

# Build configure/Makefile as they are not present.
aclocal
libtoolize
autoconf
autoreconf -i
automake --add-missing
mkdir build && cd build

cmake -DCMAKE_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib \
-Dprotobuf_WITH_ZLIB=ON \
-Dprotobuf_BUILD_SHARED_LIBS=ON \
$SRC_DIR/cmake

./configure --prefix="${PREFIX}" \
--build=${HOST} \
--host=${HOST} \
--with-pic \
--with-zlib \
--enable-shared \
--enable-static \
CC_FOR_BUILD=${CC} \
CXX_FOR_BUILD=${CXX}
if [ "${HOST}" == "powerpc64le-conda_cos7-linux-gnu" ]; then
make -j 2
make check -j 2
Expand Down
12 changes: 3 additions & 9 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source:
folder: third_party/googletest

build:
number: 0
number: 1
# Requires C++ 11, VS 2008 is not supported
skip: True # [win and vc<14]
run_exports:
Expand All @@ -32,13 +32,8 @@ requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake # [win]
- cmake
- ninja # [win]
- autoconf # [not win]
- automake # [not win]
- libtool # [not win]
- pkg-config # [not win]
- unzip # [not win]
- make # [not win]
host:
- zlib
Expand All @@ -48,7 +43,6 @@ requirements:
test:
commands:
- protoc --help
- test -f ${PREFIX}/lib/libprotobuf.a # [not win]
- test -f ${PREFIX}/lib/libprotobuf${SHLIB_EXT} # [not win]
- if not exist %PREFIX%\\Library\\lib\\libprotoc.lib exit 1 # [win]
- if not exist %PREFIX%\\Library\\lib\\libprotobuf.lib exit 1 # [win]
Expand All @@ -59,7 +53,7 @@ about:
license: BSD-3-Clause
license_family: BSD
license_file: LICENSE
summary: "Protocol Buffers - Google's data interchange format. C++ Libraries"
summary: "Protocol Buffers - Google's data interchange format. C++ Libraries and protoc, the protobuf compiler."
description: |
Protocol buffers are Google's language-neutral,
platform-neutral, extensible mechanism for serializing structured data-
Expand Down