mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
make network information service support optional as it was in qt
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
be72aabcd4
commit
7373a86388
3 changed files with 60 additions and 0 deletions
|
@ -34,6 +34,9 @@ add_feature_info(openssl WITH_OPENSSL "an open source something")
|
|||
option(WITH_ZLIB "Build zlib support" ON)
|
||||
add_feature_info(zlib WITH_ZLIB "an open source something")
|
||||
|
||||
option(WITH_NIS "Build nis support" ON)
|
||||
add_feature_info(nis WITH_NIS "an open source something")
|
||||
|
||||
option(WITH_CUPS "Build cups support" ON)
|
||||
add_feature_info(cups WITH_CUPS "an open source something")
|
||||
|
||||
|
@ -219,6 +222,13 @@ set_package_properties(ZLIB PROPERTIES
|
|||
TYPE RECOMMENDED
|
||||
)
|
||||
|
||||
find_package(NIS)
|
||||
set_package_properties(NIS PROPERTIES
|
||||
PURPOSE "Required for Network Information Service support"
|
||||
DESCRIPTION "Standard C library specific NIS implementation"
|
||||
TYPE RECOMMENDED
|
||||
)
|
||||
|
||||
find_package(PNG)
|
||||
set_package_properties(PNG PROPERTIES
|
||||
PURPOSE "PNG format handler"
|
||||
|
@ -495,6 +505,10 @@ if(NOT WITH_CUPS OR NOT CUPS_FOUND)
|
|||
katie_definition(-DQT_NO_CUPS -DQT_NO_LPR)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_NIS OR NOT NIS_FOUND)
|
||||
katie_definition(-DQT_NO_NIS)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_DIRECTWRITE)
|
||||
katie_definition(-DQT_NO_DIRECTWRITE)
|
||||
endif()
|
||||
|
|
38
cmake/modules/FindNIS.cmake
Normal file
38
cmake/modules/FindNIS.cmake
Normal file
|
@ -0,0 +1,38 @@
|
|||
# - Try to find Network Information Service
|
||||
# Once done this will define
|
||||
#
|
||||
# NIS_FOUND - system has NIS
|
||||
# NIS_INCLUDES - the NIS include directory
|
||||
# NIS_LIBRARIES - The libraries needed to use NIS
|
||||
#
|
||||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
if(NIS_INCLUDES AND NIS_LIBRARIES)
|
||||
set(NIS_FIND_QUIETLY TRUE)
|
||||
endif()
|
||||
|
||||
find_path(NIS_INCLUDES
|
||||
NAMES
|
||||
rpc/rpc.h
|
||||
HINTS
|
||||
$ENV{NISDIR}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
)
|
||||
|
||||
find_library(NIS_LIBRARIES
|
||||
nsl
|
||||
HINTS
|
||||
$ENV{NISDIR}/lib
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
${LIB_INSTALL_DIR}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(NIS DEFAULT_MSG NIS_INCLUDES NIS_LIBRARIES)
|
||||
|
||||
mark_as_advanced(NIS_INCLUDES NIS_LIBRARIES)
|
|
@ -461,6 +461,14 @@ if(WITH_X11 AND X11_FOUND)
|
|||
include_directories(${X11_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(WITH_NIS AND NIS_FOUND)
|
||||
set(EXTRA_GUI_LIBS
|
||||
${EXTRA_GUI_LIBS}
|
||||
${NIS_LIBRARIES}
|
||||
)
|
||||
include_directories(${NIS_INCLUDES})
|
||||
endif()
|
||||
|
||||
katie_generate_misc("${GUI_HEADERS}" QtGui)
|
||||
katie_generate_public("${GUI_PUBLIC_HEADERS}" QtGui)
|
||||
katie_generate_map(QtGui Q_GUI_EXPORT)
|
||||
|
|
Loading…
Add table
Reference in a new issue