From bd253e1bddd065c1d394ae487062851d820df85b Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Thu, 17 Mar 2016 23:32:07 +0100 Subject: [PATCH] cmake: fix Windows build with CUnit failmalloc and main tests succesfully pass the test now. --- lib/CMakeLists.txt | 1 + tests/nghttp2_npn_test.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 06253935..c5c9ba9f 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -41,6 +41,7 @@ if(HAVE_CUNIT) VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION} ARCHIVE_OUTPUT_NAME nghttp2 ) + target_compile_definitions(nghttp2_static PUBLIC "-DNGHTTP2_STATICLIB") endif() install(TARGETS nghttp2 diff --git a/tests/nghttp2_npn_test.c b/tests/nghttp2_npn_test.c index cbd65b71..db7fd9ff 100644 --- a/tests/nghttp2_npn_test.c +++ b/tests/nghttp2_npn_test.c @@ -22,6 +22,9 @@ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include +#endif /* HAVE_CONFIG_H */ #include "nghttp2_npn_test.h" #include