ENH: don't hardcode the /lib/kde3/ directory for the libtool files, but make

it adjustable and detect if libkdecore.so is a 64bit library

Alex
This commit is contained in:
Alexander Neundorf 2007-07-17 08:41:20 -04:00
parent e69958c3cf
commit 7eb86d1e3c
2 changed files with 11 additions and 3 deletions

View File

@ -76,8 +76,6 @@ FIND_PACKAGE(Qt3 REQUIRED)
FIND_PACKAGE(X11 REQUIRED) FIND_PACKAGE(X11 REQUIRED)
SET(QT_AND_KDECORE_LIBS ${QT_LIBRARIES} kdecore)
#add some KDE specific stuff #add some KDE specific stuff
SET(KDE3_DEFINITIONS -DQT_CLEAN_NAMESPACE -D_GNU_SOURCE) SET(KDE3_DEFINITIONS -DQT_CLEAN_NAMESPACE -D_GNU_SOURCE)
@ -168,8 +166,18 @@ FIND_LIBRARY(KDE3_KDECORE_LIBRARY NAMES kdecore
FIND_LIBRARY(KDE3_KDECORE_LIBRARY NAMES kdecore) FIND_LIBRARY(KDE3_KDECORE_LIBRARY NAMES kdecore)
SET(QT_AND_KDECORE_LIBS ${QT_LIBRARIES} ${KDE3_KDECORE_LIBRARY})
GET_FILENAME_COMPONENT(KDE3_LIB_DIR ${KDE3_KDECORE_LIBRARY} PATH ) GET_FILENAME_COMPONENT(KDE3_LIB_DIR ${KDE3_KDECORE_LIBRARY} PATH )
IF(NOT KDE3_LIBTOOL_DIR)
IF(KDE3_KDECORE_LIBRARY MATCHES lib64)
SET(KDE3_LIBTOOL_DIR /lib64/kde3)
ELSE(KDE3_KDECORE_LIBRARY MATCHES lib64)
SET(KDE3_LIBTOOL_DIR /lib/kde3)
ENDIF(KDE3_KDECORE_LIBRARY MATCHES lib64)
ENDIF(NOT KDE3_LIBTOOL_DIR)
#now search for the dcop utilities #now search for the dcop utilities
FIND_PROGRAM(KDE3_DCOPIDL_EXECUTABLE NAMES dcopidl PATHS FIND_PROGRAM(KDE3_DCOPIDL_EXECUTABLE NAMES dcopidl PATHS
$ENV{KDEDIR}/bin $ENV{KDEDIR}/bin

View File

@ -321,7 +321,7 @@ MACRO(KDE3_INSTALL_LIBTOOL_FILE _target)
FILE(APPEND ${_laname} "# Directory that this library needs to be installed in:\n") FILE(APPEND ${_laname} "# Directory that this library needs to be installed in:\n")
FILE(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}/lib/kde3'\n") FILE(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}/lib/kde3'\n")
INSTALL_FILES(/lib/kde3 FILES ${_laname}) INSTALL_FILES(${KDE3_LIBTOOL_DIR} FILES ${_laname})
ENDMACRO(KDE3_INSTALL_LIBTOOL_FILE) ENDMACRO(KDE3_INSTALL_LIBTOOL_FILE)