mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
cmake: add LightDM module
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
e1fe980be1
commit
6655b835b9
2 changed files with 43 additions and 0 deletions
|
@ -50,6 +50,7 @@ set(cmakeFiles
|
|||
FindLibSSH.cmake
|
||||
FindLibTorrent.cmake
|
||||
FindLibVNCServer.cmake
|
||||
FindLightDM.cmake
|
||||
FindMPFR.cmake
|
||||
FindMtp.cmake
|
||||
FindNetworkManager.cmake
|
||||
|
|
42
cmake/modules/FindLightDM.cmake
Normal file
42
cmake/modules/FindLightDM.cmake
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Try to find LightDM library, once done this will define:
|
||||
#
|
||||
# LIGHTDM_FOUND - system has LightDM
|
||||
# LIGHTDM_INCLUDE_DIR - the LightDM include directory
|
||||
# LIGHTDM_LIBRARIES - the libraries needed to use LightDM
|
||||
# LIGHTDM_DEFINITIONS - compiler switches required for using LightDM
|
||||
#
|
||||
# Copyright (c) 2022 Ivailo Monev <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
if(NOT WIN32)
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(PC_LIGHTDM QUIET liblightdm-gobject-1)
|
||||
|
||||
set(LIGHTDM_INCLUDE_DIR ${PC_LIGHTDM_INCLUDE_DIRS})
|
||||
set(LIGHTDM_LIBRARIES ${PC_LIGHTDM_LIBRARIES})
|
||||
endif()
|
||||
|
||||
set(LIGHTDM_VERSION ${PC_LIGHTDM_VERSION})
|
||||
set(LIGHTDM_DEFINITIONS ${PC_LIGHTDM_CFLAGS_OTHER})
|
||||
|
||||
if(NOT LIGHTDM_INCLUDE_DIR OR NOT LIGHTDM_LIBRARIES)
|
||||
find_path(LIGHTDM_INCLUDE_DIR
|
||||
NAMES lightdm-gobject-1/lightdm.h
|
||||
HINTS $ENV{LIGHTDMDIR}/include
|
||||
)
|
||||
|
||||
find_library(LIGHTDM_LIBRARIES
|
||||
NAMES lightdm-gobject-1
|
||||
HINTS $ENV{LIGHTDMDIR}/lib
|
||||
)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LightDM
|
||||
VERSION_VAR LIGHTDM_VERSION
|
||||
REQUIRED_VARS LIGHTDM_LIBRARIES LIGHTDM_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(LIGHTDM_INCLUDE_DIR LIGHTDM_LIBRARIES)
|
Loading…
Add table
Reference in a new issue