зеркало из https://github.com/nextcloud/desktop.git
Improve the Log4C module.
This commit is contained in:
Родитель
6ca27cd6c1
Коммит
b608f782c3
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
if (LOG4C_LIBRARIES AND LOG4C_INCLUDE_DIRS)
|
if (LOG4C_LIBRARIES AND LOG4C_INCLUDE_DIRS)
|
||||||
# in cache already
|
# in cache already
|
||||||
set(LOG4C_FOUND TRUE)
|
set(LOG4C_FOUND TRUE PARENT_SCOPE)
|
||||||
else (LOG4C_LIBRARIES AND LOG4C_INCLUDE_DIRS)
|
else (LOG4C_LIBRARIES AND LOG4C_INCLUDE_DIRS)
|
||||||
|
|
||||||
find_path(LOG4C_INCLUDE_DIR
|
find_path(LOG4C_INCLUDE_DIR
|
||||||
|
@ -28,7 +28,6 @@ else (LOG4C_LIBRARIES AND LOG4C_INCLUDE_DIRS)
|
||||||
/opt/local/include
|
/opt/local/include
|
||||||
/sw/include
|
/sw/include
|
||||||
)
|
)
|
||||||
mark_as_advanced(LOG4C_INCLUDE_DIR)
|
|
||||||
|
|
||||||
find_library(LOG4C_LIBRARY
|
find_library(LOG4C_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
|
@ -42,7 +41,7 @@ else (LOG4C_LIBRARIES AND LOG4C_INCLUDE_DIRS)
|
||||||
mark_as_advanced(LOG4C_LIBRARY)
|
mark_as_advanced(LOG4C_LIBRARY)
|
||||||
|
|
||||||
if (LOG4C_LIBRARY)
|
if (LOG4C_LIBRARY)
|
||||||
set(LOG4C_FOUND TRUE CACHE INTERNAL "Wether the log4c library has been found" FORCE)
|
set(LOG4C_FOUND TRUE PARENT_SCOPE)
|
||||||
endif (LOG4C_LIBRARY)
|
endif (LOG4C_LIBRARY)
|
||||||
|
|
||||||
set(LOG4C_INCLUDE_DIRS
|
set(LOG4C_INCLUDE_DIRS
|
||||||
|
@ -60,16 +59,8 @@ else (LOG4C_LIBRARIES AND LOG4C_INCLUDE_DIRS)
|
||||||
set(LOG4C_FOUND TRUE)
|
set(LOG4C_FOUND TRUE)
|
||||||
endif (LOG4C_INCLUDE_DIRS AND LOG4C_LIBRARIES)
|
endif (LOG4C_INCLUDE_DIRS AND LOG4C_LIBRARIES)
|
||||||
|
|
||||||
if (LOG4C_FOUND)
|
include(FindPackageHandleStandardArgs)
|
||||||
if (NOT Log4C_FIND_QUIETLY)
|
find_package_handle_standard_args(Log4C DEFAULT_MSG LOG4C_LIBRARIES LOG4C_INCLUDE_DIRS)
|
||||||
message(STATUS "Found Log4C: ${LOG4C_LIBRARIES}")
|
|
||||||
endif (NOT Log4C_FIND_QUIETLY)
|
|
||||||
else (LOG4C_FOUND)
|
|
||||||
if (Log4C_FIND_REQUIRED)
|
|
||||||
message(FATAL_ERROR "Could not find Log4C")
|
|
||||||
endif (Log4C_FIND_REQUIRED)
|
|
||||||
endif (LOG4C_FOUND)
|
|
||||||
|
|
||||||
# show the LOG4C_INCLUDE_DIRS and LOG4C_LIBRARIES variables only in the advanced view
|
# show the LOG4C_INCLUDE_DIRS and LOG4C_LIBRARIES variables only in the advanced view
|
||||||
mark_as_advanced(LOG4C_INCLUDE_DIRS LOG4C_LIBRARIES)
|
mark_as_advanced(LOG4C_INCLUDE_DIRS LOG4C_LIBRARIES)
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче