smarter cmake, conditional hass, still need to do conditional gzip logging
This commit is contained in:
@@ -36,10 +36,19 @@ target_compile_options(linuxSmartie
|
||||
-fdiagnostics-color=always
|
||||
)
|
||||
|
||||
# Link libraries
|
||||
target_link_libraries(linuxSmartie
|
||||
PRIVATE
|
||||
websockets
|
||||
z
|
||||
)
|
||||
find_package(libwebsockets QUIET)
|
||||
find_package(ZLIB QUIET)
|
||||
|
||||
if(libwebsockets_FOUND)
|
||||
target_link_libraries(linuxSmartie PRIVATE websockets)
|
||||
target_compile_definitions(linuxSmartie PRIVATE ENABLE_HOME_ASSISTANT)
|
||||
else()
|
||||
message(STATUS "no libwebsockets found, disabling hass")
|
||||
endif()
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
target_link_libraries(linuxSmartie PRIVATE z)
|
||||
target_compile_definitions(linuxSmartie PRIVATE ENABLE_ZLIB)
|
||||
else()
|
||||
message(STATUS "no zlib found, disabling saving logs to gz")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user