2016-12-06 00:09:33 +08:00
|
|
|
cmake_minimum_required (VERSION 3.4)
|
2016-11-25 23:33:16 +08:00
|
|
|
project (http-parser)
|
|
|
|
|
2016-12-06 00:09:33 +08:00
|
|
|
if (BUILD_SHARED_LIBS)
|
|
|
|
SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
|
|
|
endif()
|
2016-11-25 23:33:16 +08:00
|
|
|
|
2016-12-06 00:09:33 +08:00
|
|
|
add_library(http_parser http_parser.c http_parser.h)
|
2016-11-25 23:33:16 +08:00
|
|
|
|
2016-12-06 00:09:33 +08:00
|
|
|
install(TARGETS http_parser
|
|
|
|
RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
|
|
|
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
|
|
|
|
)
|
2016-11-25 23:33:16 +08:00
|
|
|
|
2016-12-06 00:09:33 +08:00
|
|
|
if (NOT SKIP_INSTALL_HEADERS)
|
|
|
|
install(FILES http_parser.h DESTINATION "${CMAKE_INSTALL_PREFIX}/include")
|
2016-11-25 23:33:16 +08:00
|
|
|
endif()
|