forked from AeroNotix/slim-git
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CMake modules file of ConsoleKit.
Signed-off-by: Nobuhiro Iwamatsu <[email protected]>
- Loading branch information
iwamatsu
committed
Feb 14, 2012
1 parent
caae28d
commit 6e73e97
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# - Try to find the ConsoleKit connector library (libck-connector) | ||
# Once done this will define | ||
# | ||
# CKCONNECTOR_FOUND - system has the CK Connector | ||
# CKCONNECTOR_INCLUDE_DIR - the CK Connector include directory | ||
# CKCONNECTOR_LIBRARIES - the libraries needed to use CK Connector | ||
|
||
# Copyright (c) 2008, Kevin Kofler, <[email protected]> | ||
# modeled after FindLibArt.cmake: | ||
# Copyright (c) 2006, Alexander Neundorf, <[email protected]> | ||
# | ||
# Redistribution and use is allowed according to the terms of the BSD license. | ||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
|
||
|
||
if (CKCONNECTOR_INCLUDE_DIR AND CKCONNECTOR_LIBRARIES) | ||
|
||
# in cache already | ||
SET(CKCONNECTOR_FOUND TRUE) | ||
|
||
else (CKCONNECTOR_INCLUDE_DIR AND CKCONNECTOR_LIBRARIES) | ||
|
||
IF (NOT WIN32) | ||
FIND_PACKAGE(PkgConfig) | ||
IF (PKG_CONFIG_FOUND) | ||
# use pkg-config to get the directories and then use these values | ||
# in the FIND_PATH() and FIND_LIBRARY() calls | ||
pkg_check_modules(_CKCONNECTOR_PC QUIET ck-connector) | ||
ENDIF (PKG_CONFIG_FOUND) | ||
ENDIF (NOT WIN32) | ||
|
||
FIND_PATH(CKCONNECTOR_INCLUDE_DIR ck-connector.h | ||
${_CKCONNECTOR_PC_INCLUDE_DIRS} | ||
) | ||
|
||
FIND_LIBRARY(CKCONNECTOR_LIBRARIES NAMES ck-connector | ||
PATHS | ||
${_CKCONNECTOR_PC_LIBDIR} | ||
) | ||
|
||
|
||
if (CKCONNECTOR_INCLUDE_DIR AND CKCONNECTOR_LIBRARIES) | ||
set(CKCONNECTOR_FOUND TRUE) | ||
endif (CKCONNECTOR_INCLUDE_DIR AND CKCONNECTOR_LIBRARIES) | ||
|
||
|
||
if (CKCONNECTOR_FOUND) | ||
if (NOT CkConnector_FIND_QUIETLY) | ||
message(STATUS "Found ck-connector: ${CKCONNECTOR_LIBRARIES}") | ||
endif (NOT CkConnector_FIND_QUIETLY) | ||
else (CKCONNECTOR_FOUND) | ||
if (CkConnector_FIND_REQUIRED) | ||
message(FATAL_ERROR "Could NOT find ck-connector") | ||
endif (CkConnector_FIND_REQUIRED) | ||
endif (CKCONNECTOR_FOUND) | ||
|
||
MARK_AS_ADVANCED(CKCONNECTOR_INCLUDE_DIR CKCONNECTOR_LIBRARIES) | ||
|
||
endif (CKCONNECTOR_INCLUDE_DIR AND CKCONNECTOR_LIBRARIES) |