diff --git a/builds/gyp/platform.hpp b/builds/gyp/platform.hpp index ae3db3e3..0b50178d 100644 --- a/builds/gyp/platform.hpp +++ b/builds/gyp/platform.hpp @@ -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 diff --git a/builds/gyp/project.gyp b/builds/gyp/project.gyp index f8323a0c..37130338 100644 --- a/builds/gyp/project.gyp +++ b/builds/gyp/project.gyp @@ -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' + ] + } ] } ]