fixed logw build handling, removed MAKE_DEPENDENT_OPTION

This commit is contained in:
Nick 2017-11-23 17:06:26 +01:00
parent d26f68ee05
commit 98535324fe

View File

@ -1,5 +1,4 @@
cmake_minimum_required(VERSION 3.2)
include(CMakeDependentOption)
include(CPack)
include(CheckFunctionExists)
@ -18,12 +17,11 @@ option (TRXCTL "Support RS-232 to RS-485 converter data direction control" ON)
if(TRXCTL)
add_definitions(-DTRXCTL)
endif()
option (LOG "enabling logging facility via logw" ON)
check_function_exists(logw HAVE_LOGW)
if(HAVE_LOGW AND LOG)
option (LOG "enabling logging facility" ON)
if(LOG)
add_definitions(-DLOG)
endif()
CMAKE_DEPENDENT_OPTION(DEBUG_LOG "extra debug log info" OFF "LOGW" OFF)
option(DEBUG_LOG "extra debug log info" ON)
if(DEBUG_LOG)
add_definitions(-DDEBUG)
endif()