]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | cmake_minimum_required(VERSION 3.4) |
2 | project(http-parser C) | |
3 | ||
4 | if(CMAKE_BUILD_TYPE MATCHES "Release") | |
5 | add_definitions(-DHTTP_PARSER_STRICT=0) | |
6 | endif() | |
7 | ||
8 | add_library(http_parser http_parser.c http_parser.h) | |
9 | ||
10 | target_include_directories(http_parser PUBLIC $<INSTALL_INTERFACE:include>) | |
11 | ||
12 | install( | |
13 | TARGETS http_parser | |
14 | EXPORT NODEJS_HTTP_PARSER_ALL_TARGETS | |
15 | LIBRARY DESTINATION lib | |
16 | ARCHIVE DESTINATION lib | |
17 | RUNTIME DESTINATION bin | |
18 | ) | |
19 | ||
20 | install( | |
21 | EXPORT NODEJS_HTTP_PARSER_ALL_TARGETS | |
22 | NAMESPACE unofficial::http_parser:: | |
23 | FILE unofficial-http-parser-config.cmake | |
24 | DESTINATION share/unofficial-http-parser | |
25 | ) | |
26 | ||
27 | install(FILES http_parser.h DESTINATION include) |