mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-02 03:38:03 +08:00
Add option to disable brotli if desired by the builder (#1050)
This commit is contained in:
parent
0818384172
commit
a7f05c4214
@ -18,6 +18,7 @@ option(BUILD_ORM "Build orm" ON)
|
|||||||
option(COZ_PROFILING "Use coz for profiling" OFF)
|
option(COZ_PROFILING "Use coz for profiling" OFF)
|
||||||
option(BUILD_DROGON_SHARED "Build drogon as a shared lib" OFF)
|
option(BUILD_DROGON_SHARED "Build drogon as a shared lib" OFF)
|
||||||
option(BUILD_DOC "Build Doxygen documentation" OFF)
|
option(BUILD_DOC "Build Doxygen documentation" OFF)
|
||||||
|
option(BUILD_BROTLI "Build Brotli" ON)
|
||||||
|
|
||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
CMAKE_DEPENDENT_OPTION(BUILD_POSTGRESQL "Build with postgresql support" ON "BUILD_ORM" OFF)
|
CMAKE_DEPENDENT_OPTION(BUILD_POSTGRESQL "Build with postgresql support" ON "BUILD_ORM" OFF)
|
||||||
@ -221,12 +222,14 @@ endif (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"
|
|||||||
AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD"
|
AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD"
|
||||||
AND NOT WIN32)
|
AND NOT WIN32)
|
||||||
|
|
||||||
find_package(Brotli)
|
if (BUILD_BROTLI)
|
||||||
if (Brotli_FOUND)
|
find_package(Brotli)
|
||||||
message(STATUS "Brotli found")
|
if (Brotli_FOUND)
|
||||||
add_definitions(-DUSE_BROTLI)
|
message(STATUS "Brotli found")
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE Brotli_lib)
|
add_definitions(-DUSE_BROTLI)
|
||||||
endif (Brotli_FOUND)
|
target_link_libraries(${PROJECT_NAME} PRIVATE Brotli_lib)
|
||||||
|
endif (Brotli_FOUND)
|
||||||
|
endif (BUILD_BROTLI)
|
||||||
|
|
||||||
set(DROGON_SOURCES
|
set(DROGON_SOURCES
|
||||||
lib/src/AOPAdvice.cc
|
lib/src/AOPAdvice.cc
|
||||||
|
Loading…
Reference in New Issue
Block a user