[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kremotecontrol] libkremotecontrol: Do not hardcode -lX11 and
From:       Raphael Kubo da Costa <kubo () profusion ! mobi>
Date:       2011-08-31 20:57:47
Message-ID: 20110831205747.802B0A6078 () git ! kde ! org
[Download RAW message or body]

Git commit 97010210b613a8f308ff483816b93bd651178ca9 by Raphael Kubo da Costa.
Committed on 31/08/2011 at 22:55.
Pushed by rkcosta into branch 'master'.

Do not hardcode -lX11 and -lXtst when linking.

Hardcoding does not use the information obtained with find_package(X11),
and breaks compilation when the libraries are not in standard paths.

Furthermore, add X11's include path to make sure the headers are found
too.

CCMAIL: mzanetti@kde.org
(cherry picked from commit 55c2de52c73c1cc1839352c57edfcaa0de34925c)

M  +2    -1    libkremotecontrol/CMakeLists.txt

http://commits.kde.org/kremotecontrol/97010210b613a8f308ff483816b93bd651178ca9

diff --git a/libkremotecontrol/CMakeLists.txt b/libkremotecontrol/CMakeLists.txt
index 1a2566a..5d32195 100644
--- a/libkremotecontrol/CMakeLists.txt
+++ b/libkremotecontrol/CMakeLists.txt
@@ -3,6 +3,7 @@ include_directories(
    ${CMAKE_CURRENT_BINARY_DIR}
    ${KDE4_INCLUDES}
    ${QT_INCLUDES}
+   ${X11_INCLUDE_DIR}
 #   ${KDE4WORKSPACE_INCLUDE_DIR}
 )
 
@@ -38,7 +39,7 @@ set(libkremotecontrol_LIB_SRCS
 kde4_add_library(libkremotecontrol SHARED ${libkremotecontrol_LIB_SRCS})
 set_target_properties(libkremotecontrol PROPERTIES VERSION 1.0.0 SOVERSION 1)
 
-target_link_libraries(libkremotecontrol ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} \
${QT_QTXMLPATTERNS_LIBRARY} ${QT_QTSCRIPT_LIBRARY} -lX11 -lXtst) \
+target_link_libraries(libkremotecontrol ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} \
${QT_QTXMLPATTERNS_LIBRARY} ${QT_QTSCRIPT_LIBRARY} ${X11_X11_LIB} ${X11_XTest_LIB})  
 
 install(TARGETS libkremotecontrol ${INSTALL_TARGETS_DEFAULT_ARGS})


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic