1
# - Try to find the kdegames library
2
# Once done this will define
4
# KDEGAMES_FOUND - system has the kdegames library
5
# KDEGAMES_INCLUDE_DIRS - a list of the relevant libkdegames include dirs. Allows the use of forwarding header, e.g. #include <KGameDifficulty>
6
# KDEGAMES_INCLUDE_DIR - the kdegames include directory
7
# KDEGAMES_LIBRARY - Link this to use the kdegames library
9
include(CheckLibraryExists)
11
if (KDEGAMES_INCLUDE_DIR AND KDEGAMES_LIBRARY)
13
SET(KDEGAMES_FOUND TRUE)
15
else (KDEGAMES_INCLUDE_DIR AND KDEGAMES_LIBRARY)
18
set(KDEGAMES_INCLUDE_DIRS)
19
set(KDEGAMES_INCLUDE_DIR)
21
FIND_PATH(KDEGAMES_INCLUDE_DIR kstandardgameaction.h
22
${INCLUDE_INSTALL_DIR}
24
${GNUWIN32_DIR}/include
26
set(KDEGAMES_INCLUDE_DIR ${KDEGAMES_INCLUDE_DIR})
28
set(CMAKE_LIBRARY_PATH ${LIB_INSTALL_DIR})
29
find_library(KDEGAMES_LIBRARY NAMES kdegames
35
set(KDEGAMES_LIBRARY ${KDEGAMES_LIBRARY})
37
include(FindPackageHandleStandardArgs)
38
FIND_PACKAGE_HANDLE_STANDARD_ARGS(KDEGAMES DEFAULT_MSG KDEGAMES_INCLUDE_DIR KDEGAMES_LIBRARY )
40
MARK_AS_ADVANCED(KDEGAMES_INCLUDE_DIR KDEGAMES_LIBRARY)
41
ENDIF(KDEGAMES_INCLUDE_DIR AND KDEGAMES_LIBRARY)
43
#The ${KDEGAMES_INCLUDE_DIR}/KDE addition is for the forwarding includes
44
IF(NOT KDEGAMES_INCLUDE_DIRS)
45
SET(KDEGAMES_INCLUDE_DIRS ${KDEGAMES_INCLUDE_DIR} ${KDEGAMES_INCLUDE_DIR}/KDE ${KDEGAMES_INCLUDE_DIR}/KDE/KGame)
46
MARK_AS_ADVANCED(KDEGAMES_INCLUDE_DIRS)
47
ENDIF(NOT KDEGAMES_INCLUDE_DIRS)