0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-26 23:01:04 +08:00

Problem: if src/platform.hpp still exists, gyp uses this

Gyp needs its own platform.hpp; there is no way to delete this
file automatically.

Solution: copy gyp's platform.hpp into src, so that things build
properly no matter what the starting state. If you build with gyp
and then try to build using autotools' makefile, you'll get an
error from the platform.hpp.
This commit is contained in:
Pieter Hintjens 2016-02-12 22:16:35 +01:00
parent 9bebd4dce9
commit c78e4f33a3
2 changed files with 17 additions and 1 deletions

View File

@ -33,6 +33,11 @@
// This file provides the configuration for Linux, Windows, and OS/X
// as determined by ZMQ_HAVE_XXX macros passed from project.gyp
// Check that we're being called from our gyp makefile
#ifndef ZMQ_GYP_BUILD
# error "foreign platform.hpp detected, please re-configure"
#endif
// Set for all platforms
#define ZMQ_HAVE_CURVE 1
#define ZMQ_USE_TWEETNACL 1

View File

@ -15,7 +15,10 @@
'.'
],
'defines': [
'ZMQ_CUSTOM_PLATFORM_HPP'
'_REENTRANT',
'_THREAD_SAFE',
'ZMQ_CUSTOM_PLATFORM_HPP',
'ZMQ_GYP_BUILD'
],
'conditions': [
[ 'OS=="win"', {
@ -264,6 +267,14 @@
'../../src/yqueue.hpp',
'../../src/zmq.cpp',
'../../src/zmq_utils.cpp'
],
'copies': [
{
'destination': '../../src',
'files': [
'platform.hpp'
]
}
]
}
]