aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/http-parser/CMakeLists.txt
blob: 40b0d55c9dbe174f23adba853a9ed9889fb15253 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
SET(HTTPSRC            http_parser.c)

if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
endif ()
ADD_LIBRARY(rspamd-http-parser ${LINK_TYPE} ${HTTPSRC})
SET_TARGET_PROPERTIES(rspamd-http-parser PROPERTIES VERSION ${RSPAMD_VERSION})
SET_TARGET_PROPERTIES(rspamd-http-parser PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB")

IF(NO_SHARED MATCHES "OFF")
    INSTALL(TARGETS rspamd-http-parser
        LIBRARY DESTINATION ${LIBDIR}
        PUBLIC_HEADER DESTINATION ${INCLUDEDIR})
ENDIF(NO_SHARED MATCHES "OFF")