Browse Source

BUG: KDEDIRS contains the kde install locations, not the binary dirs, so
make KDEDIRS actually work in FindKDE4.cmake

Alex

Alexander Neundorf 18 years ago
parent
commit
983e2a9a51
1 changed files with 2 additions and 4 deletions
  1. 2 4
      Modules/FindKDE4.cmake

+ 2 - 4
Modules/FindKDE4.cmake

@@ -13,6 +13,7 @@ FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
 
 # For KDE4 kde-config has been renamed to kde4-config
 FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
+   PATH_SUFFIXES bin               # the suffix is for the paths coming from KDEDIRS
    PATHS
    ${CMAKE_INSTALL_PREFIX}/bin
    ${_KDEDIRS}
@@ -20,10 +21,7 @@ FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
    NO_DEFAULT_PATH
    )
 
-
-IF (NOT KDE4_KDECONFIG_EXECUTABLE)
-   FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config )
-ENDIF (NOT KDE4_KDECONFIG_EXECUTABLE)
+FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config )
 
 IF (KDE4_KDECONFIG_EXECUTABLE)
    # then ask kde4-config for the kde data dirs