2018-04-27 00:51:13 +03:00
|
|
|
cmake_minimum_required(VERSION 3.4)
|
|
|
|
project(http-parser C)
|
2016-11-25 16:33:16 +01:00
|
|
|
|
2017-01-12 12:28:08 +01:00
|
|
|
if(CMAKE_BUILD_TYPE MATCHES "Release")
|
|
|
|
add_definitions(-DHTTP_PARSER_STRICT=0)
|
|
|
|
endif()
|
|
|
|
|
2016-12-05 17:09:33 +01:00
|
|
|
add_library(http_parser http_parser.c http_parser.h)
|
2016-11-25 16:33:16 +01:00
|
|
|
|
2018-04-27 00:51:13 +03:00
|
|
|
target_include_directories(http_parser PUBLIC $<INSTALL_INTERFACE:include>)
|
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS http_parser
|
|
|
|
EXPORT NODEJS_HTTP_PARSER_ALL_TARGETS
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
EXPORT NODEJS_HTTP_PARSER_ALL_TARGETS
|
|
|
|
NAMESPACE unofficial::http_parser::
|
|
|
|
FILE unofficial-http-parser-config.cmake
|
|
|
|
DESTINATION share/unofficial-http-parser
|
2016-12-05 17:09:33 +01:00
|
|
|
)
|
2016-11-25 16:33:16 +01:00
|
|
|
|
2018-04-27 00:51:13 +03:00
|
|
|
install(FILES http_parser.h DESTINATION include)
|