1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-28 01:28:30 +00:00

Fix x11 check in cmake

This commit is contained in:
Nikolas Garofil 2010-10-27 07:37:11 +02:00
parent 11e5db2132
commit 89a8456495
2 changed files with 39 additions and 37 deletions

View File

@ -166,45 +166,48 @@ endif(BUILD_ICONV)
if(BUILD_X11) if(BUILD_X11)
include(FindX11) include(FindX11)
find_package(X11) find_package(X11)
set(conky_includes ${conky_includes} ${X11_INCLUDE_DIR}) if(X11_FOUND)
set(conky_libs ${conky_libs} ${X11_LIBRARIES}) set(conky_includes ${conky_includes} ${X11_INCLUDE_DIR})
set(conky_libs ${conky_libs} ${X11_LIBRARIES})
# check for Xdamage # check for Xdamage
if(BUILD_XDAMAGE) if(BUILD_XDAMAGE)
if(NOT X11_Xdamage_FOUND) if(NOT X11_Xdamage_FOUND)
message(FATAL_ERROR "Unable to find Xdamage library") message(FATAL_ERROR "Unable to find Xdamage library")
endif(NOT X11_Xdamage_FOUND) endif(NOT X11_Xdamage_FOUND)
if(NOT X11_Xfixes_FOUND) if(NOT X11_Xfixes_FOUND)
message(FATAL_ERROR "Unable to find Xfixes library") message(FATAL_ERROR "Unable to find Xfixes library")
endif(NOT X11_Xfixes_FOUND) endif(NOT X11_Xfixes_FOUND)
set(conky_libs ${conky_libs} ${X11_Xdamage_LIB} ${X11_Xfixes_LIB}) set(conky_libs ${conky_libs} ${X11_Xdamage_LIB} ${X11_Xfixes_LIB})
endif(BUILD_XDAMAGE) endif(BUILD_XDAMAGE)
# check for Xft # check for Xft
if(BUILD_XFT) if(BUILD_XFT)
find_path(freetype_INCLUDE_PATH freetype/config/ftconfig.h ${INCLUDE_SEARCH_PATH} find_path(freetype_INCLUDE_PATH freetype/config/ftconfig.h ${INCLUDE_SEARCH_PATH}
/usr/include/freetype2 /usr/include/freetype2
/usr/local/include/freetype2) /usr/local/include/freetype2)
if(freetype_INCLUDE_PATH) if(freetype_INCLUDE_PATH)
set(freetype_FOUND true) set(freetype_FOUND true)
set(conky_includes ${conky_includes} ${freetype_INCLUDE_PATH}) set(conky_includes ${conky_includes} ${freetype_INCLUDE_PATH})
else(freetype_INCLUDE_PATH) else(freetype_INCLUDE_PATH)
message(FATAL_ERROR "Unable to find freetype library") message(FATAL_ERROR "Unable to find freetype library")
endif(freetype_INCLUDE_PATH) endif(freetype_INCLUDE_PATH)
if(NOT X11_Xft_FOUND) if(NOT X11_Xft_FOUND)
message(FATAL_ERROR "Unable to find Xft library") message(FATAL_ERROR "Unable to find Xft library")
endif(NOT X11_Xft_FOUND) endif(NOT X11_Xft_FOUND)
set(conky_libs ${conky_libs} ${X11_Xft_LIB}) set(conky_libs ${conky_libs} ${X11_Xft_LIB})
endif(BUILD_XFT) endif(BUILD_XFT)
# check for Xdbe
if(BUILD_XDBE)
if(NOT X11_Xext_FOUND)
message(FATAL_ERROR "Unable to find Xext library (needed for Xdbe)")
endif(NOT X11_Xext_FOUND)
set(conky_libs ${conky_libs} ${X11_Xext_LIB})
endif(BUILD_XDBE)
# check for Xdbe
if(BUILD_XDBE)
if(NOT X11_Xext_FOUND)
message(FATAL_ERROR "Unable to find Xext library (needed for Xdbe)")
endif(NOT X11_Xext_FOUND)
set(conky_libs ${conky_libs} ${X11_Xext_LIB})
endif(BUILD_XDBE)
else(X11_FOUND)
message(FATAL_ERROR "Unable to find X11 library")
endif(X11_FOUND)
endif(BUILD_X11) endif(BUILD_X11)
if(BUILD_LUA) if(BUILD_LUA)

View File

@ -27,7 +27,6 @@
#ifndef X11_H_ #ifndef X11_H_
#define X11_H_ #define X11_H_
#include <X11/Xlib.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>