build: add log option
This commit is contained in:
+11
-4
@@ -11,6 +11,15 @@ project(tinymitm LANGUAGES CXX)
|
|||||||
# options
|
# options
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
option(TINYMITM_TEST "Add test project" OFF)
|
option(TINYMITM_TEST "Add test project" OFF)
|
||||||
|
option(TINYMITM_LOGS "Add logs for proxy" OFF)
|
||||||
|
|
||||||
|
if (TINYMITM_TEST)
|
||||||
|
set(TINYMITM_LOGS ON CACHE BLOOL "" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (TINYMITM_LOGS)
|
||||||
|
add_compile_definitions(TINYMITM_LOGS)
|
||||||
|
endif()
|
||||||
|
|
||||||
# ---------------------
|
# ---------------------
|
||||||
# external dependencies
|
# external dependencies
|
||||||
@@ -28,14 +37,13 @@ FetchContent_Declare(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# seallib config
|
# seallib config
|
||||||
if (TINYMITM_TEST)
|
set(SEALLIB_EVENTS ON CACHE BOOL "" FORCE)
|
||||||
|
if (TINYMITM_LOGS)
|
||||||
set(SEALLIB_LOG ON CACHE BOOL "" FORCE)
|
set(SEALLIB_LOG ON CACHE BOOL "" FORCE)
|
||||||
endif()
|
endif()
|
||||||
set(SEALLIB_EVENTS ON CACHE BOOL "" FORCE)
|
|
||||||
FetchContent_GetProperties(seallib)
|
FetchContent_GetProperties(seallib)
|
||||||
FetchContent_MakeAvailable(seallib)
|
FetchContent_MakeAvailable(seallib)
|
||||||
|
|
||||||
|
|
||||||
# wolfssl config
|
# wolfssl config
|
||||||
set(WOLFSSL_ALPN ON CACHE BOOL "" FORCE)
|
set(WOLFSSL_ALPN ON CACHE BOOL "" FORCE)
|
||||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
|
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
|
||||||
@@ -69,7 +77,6 @@ target_link_libraries(tinymitm PRIVATE tinymitm-warnings)
|
|||||||
target_link_libraries(tinymitm PUBLIC seallib wolfssl)
|
target_link_libraries(tinymitm PUBLIC seallib wolfssl)
|
||||||
set_target_properties(tinymitm PROPERTIES CXX_EXTENSIONS OFF)
|
set_target_properties(tinymitm PROPERTIES CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
# test
|
# test
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user