Hello back,

2010/1/11 Alexander Neundorf <[email protected]>
>
> On Sunday 10 January 2010, Dario Freddi wrote:
> > Sorry for the late answer, troubled life is back.
> >
> > On Wednesday 30 December 2009 21:38:12 Alexander Neundorf wrote:
> > [..]
> >
> > > In general determining install locations are the responsibility of the
> > >  project which is being built. I mean, if I chose to install something to
> > >  $HOME/inst it shouldn't matter where PolkitQt is installed.
> > >
> > > What we do for the other install dirs like BIN_INSTALL_DIR etc. in
> > > kdelibs is the following:
> > > if the variable (e.g. KDE4_AUTH_POLICY_FILES_INSTALL_DIR) has not been
> > > explicitely set, and if the current CMAKE_INSTALL_PREFIX is the same as
> > > the kdelibs install prefix, then we reuse the variable (e.g.
> > > KDE4_AUTH_POLICY_FILES_INSTALL_DIR) from kdelibs.
> > >
> > > Look for the macro _SET_FANCY() in
> > > kdelibs/cmake/modules/FindKDE4Internal.cmake.
> > >
> > > Does this do what you want ?
> >
> > Unfortunately not. The problem here is that we really want to store some
> > data: KAuth is backend based, and we have no knowledge at build time
> > (outside KDELibs) of which backend was built, hence how to handle it.
> >
> > This is probably a reason why I'd put stuff in
> > CreateKDELibsDependencies.cmake. I'd add two variables: one,
> > KDE4_AUTH_BACKEND_NAME, carrying the name of the chosen backend, and one,
> > KDE4_AUTH_POLICY_FILES_INSTALL_DIR carrying the location of the policy
> > files install dir, if any (which is required unless we decide to install
> > findpolkitqt*.cmake).
> >
> > Now, the logic for selecting the backend name is
> > kdecore/auth/ConfigureChecks.cmake, where the KAUTH_BACKEND variable is
> > set. Once that is done, finding out the value of
> > KDE4_AUTH_POLICY_FILES_INSTALL_DIR is a breeze. The only problem I see is
> > that putting straight into
> > CreateKDELibsDependenciesFile.cmake set(KDE4_AUTH_BACKEND_NAME
> > ${KAUTH_BACKEND}) fairly doesn't work.
>
> I guess KAUTH_BACKEND is empty for you ?
> There are I think three way you can get values from child directories up their
> parent directories:
>
> 1) put them in the cache.
> This is "almost" done for KAUTH_BACKEND.
> There is the following code in kdecore/auth/ConfigureChecks.cmake:
>
> set(KAUTH_BACKEND "" CACHE STRING "Specifies the KAuth ...")
> ...
>       if (POLKITQT_FOUND)
>            set (KAUTH_BACKEND "PolkitQt")
> ...
>
>
> The first line puts KAUTH_BACKEND in the cache if it's not already there. So
> you can access this value ("") from the toplevel.
> Then, later on, there are several set(KAUTH_BACKEND ...) calls without
> the "CACHE" argument. This means they set the non-cache variable
> KAUTH_BACKEND, which hides the one from the cache, but which doesn't write
> the new value into the cache.
> To actually get this value into the cache, you need to use the FORCE argument
> for set:
> set( ... CACHE ... FORCE)
> This will write the value into the cache no matter what's already there in the
> cache.
> I guess this is what you want to do.

It is. The attached patch does exactly this, and it works. It feels to
me a bit weirdo, though, that I have to set the docstring each and
every time. Maybe I am missing something?
Also, I changed the name of KAUTH_BACKEND into KDE4_AUTH_BACKEND_NAME
for consistency. I'll write somewhere about the change as well.

>
>
> [snip]
>
> And I still think the install dir should be handled the same way the other
> install dirs are handled, i.e. it should take the same value as kdelibs if it
> is installed to the same prefix, it should be settable via the cache, and I
> wouldn't mind if it defaults to some other location if the
> CMAKE_INSTALL_PREFIX is different from the kdelibs location.


It actually should be already so: as you can see from the patch, the
locations are based upon CMAKE_INSTALL_PREFIX (even if this might lead
to utter fails, which are however decently reported at build time),
and added to the cache.

>
>
> Alex
Index: cmake/modules/FindPolkitQt-1.cmake
===================================================================
--- cmake/modules/FindPolkitQt-1.cmake	(revisione 1072643)
+++ cmake/modules/FindPolkitQt-1.cmake	(copia locale)
@@ -87,7 +87,7 @@
 # all listed variables are TRUE
 find_package_handle_standard_args(PolkitQt-1 DEFAULT_MSG POLKITQT-1_LIBRARIES POLKITQT-1_INCLUDE_DIR POLKITQT-1_VERSION_OK)
 
-mark_as_advanced(POLKITQT-1_INCLUDE_DIR POLKITQT-1_CORE_LIBRARY POLKITQT-1_GUI_LIBRARY POLKITQT-1_LIBRARIES POLKITQT-1_VERSION_OK)
+mark_as_advanced(POLKITQT-1_INCLUDE_DIR POLKITQT-1_CORE_LIBRARY POLKITQT-1_GUI_LIBRARY POLKITQT-1_AGENT_LIBRARY POLKITQT-1_LIBRARIES POLKITQT-1_VERSION_OK POLKITQT-1_VERSION_FILE POLKITQT-1_POLICY_FILES_INSTALL_DIR)
 
 if (POLKITQT-1_FOUND)
     if (NOT PC_POLKITQT-1_PREFIX STREQUAL CMAKE_INSTALL_PREFIX)
@@ -96,4 +96,5 @@
     endif (NOT PC_POLKITQT-1_PREFIX STREQUAL CMAKE_INSTALL_PREFIX)
 endif (POLKITQT-1_FOUND)
 
-set(POLKITQT-1_POLICY_FILES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/polkit-1/actions)
+set(POLKITQT-1_POLICY_FILES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/polkit-1/actions CACHE STRING
+    "Where policy files generated with polkit-1 will be installed")
Index: cmake/modules/FindPolkitQt.cmake
===================================================================
--- cmake/modules/FindPolkitQt.cmake	(revisione 1072643)
+++ cmake/modules/FindPolkitQt.cmake	(copia locale)
@@ -88,7 +88,7 @@
 # all listed variables are TRUE
 find_package_handle_standard_args(PolkitQt  DEFAULT_MSG  POLKITQT_INCLUDE_DIR POLKITQT_GUI_LIBRARY POLKITQT_CORE_LIBRARY POLKITQT_VERSION_OK)
 
-mark_as_advanced(POLKITQT_INCLUDE_DIR POLKITQT_CORE_LIBRARY POLKITQT_GUI_LIBRARY POLKITQT_LIBRARIES POLKITQT_VERSION_OK)
+mark_as_advanced(POLKITQT_INCLUDE_DIR POLKITQT_CORE_LIBRARY POLKITQT_GUI_LIBRARY POLKITQT_LIBRARIES POLKITQT_VERSION_OK POLKITQT_VERSION_FILE POLKITQT_POLICY_FILES_INSTALL_DIR)
 
 if(POLKITQT_FOUND)
     get_filename_component(_POLKITQT_INSTALL_PREFIX "${POLKITQT_CORE_LIBRARY}"  PATH)
@@ -99,4 +99,5 @@
     endif (NOT _POLKITQT_INSTALL_PREFIX STREQUAL CMAKE_INSTALL_PREFIX)
 endif(POLKITQT_FOUND)
 
-set(POLKITQT_POLICY_FILES_INSTALL_DIR share/PolicyKit/policy/)
+set(POLKITQT_POLICY_FILES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/PolicyKit/policy/ CACHE STRING
+    "Where policy files generated with PolicyKit will be installed")
Index: cmake/modules/KDE4Macros.cmake
===================================================================
--- cmake/modules/KDE4Macros.cmake	(revisione 1072643)
+++ cmake/modules/KDE4Macros.cmake	(copia locale)
@@ -1271,9 +1271,9 @@
 # the install phase
 function(KDE4_INSTALL_AUTH_ACTIONS HELPER_ID ACTIONS_FILE)
 
-  if(APPLE)
+  if(KDE4_AUTH_BACKEND_NAME STREQUAL "APPLE")
     install(CODE "execute_process(COMMAND ${KDE4_KAUTH_POLICY_GEN_EXECUTABLE} ${ACTIONS_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})")
-  elseif(UNIX)
+  elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT" OR KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1")
     set(_output ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.policy)
     get_filename_component(_input ${ACTIONS_FILE} ABSOLUTE)
     
@@ -1285,13 +1285,7 @@
                        DEPENDS ${_KDE4_KAUTH_POLICY_GEN_EXECUTABLE_DEP})
     add_custom_target("actions for ${HELPER_ID}" ALL DEPENDS ${_output})
 
-    if (NOT POLKITQT_FOUND)
-        macro_optional_find_package(PolkitQt)
-    endif (NOT POLKITQT_FOUND)
-
-    if (POLKITQT_FOUND)
-      install(FILES ${_output} DESTINATION ${POLKITQT_POLICY_FILES_INSTALL_DIR})
-    endif (POLKITQT_FOUND)
+    install(FILES ${_output} DESTINATION ${KDE4_AUTH_POLICY_FILES_INSTALL_DIR})
   endif()
 
 endfunction(KDE4_INSTALL_AUTH_ACTIONS)
Index: CreateKDELibsDependenciesFile.cmake
===================================================================
--- CreateKDELibsDependenciesFile.cmake	(revisione 1072643)
+++ CreateKDELibsDependenciesFile.cmake	(copia locale)
@@ -115,3 +115,8 @@
 # in order to work properly. Used by kwrited.
 macro_bool_to_01(HAVE_UTEMPTER KDE4_KPTY_BUILT_WITH_UTEMPTER)
 file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake" "set(KDE4_KPTY_BUILT_WITH_UTEMPTER ${KDE4_KPTY_BUILT_WITH_UTEMPTER})")
+
+# Append stuff needed by the KAuth framework
+file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake" "
+set(KDE4_AUTH_BACKEND_NAME \"${KDE4_AUTH_BACKEND_NAME}\")
+set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR \"${KDE4_AUTH_POLICY_FILES_INSTALL_DIR}\")")
Index: kdecore/auth/ConfigureChecks.cmake
===================================================================
--- kdecore/auth/ConfigureChecks.cmake	(revisione 1072643)
+++ kdecore/auth/ConfigureChecks.cmake	(copia locale)
@@ -1,28 +1,34 @@
 ####### checks for kdecore/kauth ###############
 
-set(KAUTH_BACKEND "" CACHE STRING "Specifies the KAuth backend to build. Current available options are 
+set(KDE4_AUTH_BACKEND_NAME "" CACHE STRING "Specifies the KAuth backend to build. Current available options are 
                                    PolkitQt, PolkitQt-1, Fake, Apple. Not setting this variable will build the most 
                                    appropriate backend for your system")
 ## Check if the user did not specify a backend to be built. If that is the case,
 ## we check what is the best backend to build on this system.
 ## 4.4: We leave polkit-0.9 having more priority over polkit-1. This will change from 4.5 on
-if(NOT KAUTH_BACKEND)
+if(NOT KDE4_AUTH_BACKEND_NAME)
     # Look for the most appropriate backend
     message(STATUS "No backend for KAuth was explicitely specified: probing system to find the best one available")
     if (APPLE)
-        set (KAUTH_BACKEND "OSX")
+        set (KDE4_AUTH_BACKEND_NAME "OSX" CACHE STRING "Specifies the KAuth backend to build. Current available options are 
+                                   PolkitQt, PolkitQt-1, Fake, Apple. Not setting this variable will build the most 
+                                   appropriate backend for your system" FORCE)
     elseif (UNIX)
         macro_optional_find_package(PolkitQt)
 
         if (POLKITQT_FOUND)
-            set (KAUTH_BACKEND "PolkitQt")
+            set (KDE4_AUTH_BACKEND_NAME "PolkitQt" CACHE STRING "Specifies the KAuth backend to build. Current available options are 
+                                   PolkitQt, PolkitQt-1, Fake, Apple. Not setting this variable will build the most 
+                                   appropriate backend for your system" FORCE)
             macro_log_feature(POLKITQT_FOUND "PolkitQt" "Qt Wrapper around Policykit" "http://api.kde.org/polkit-qt";
                               FALSE "" "STRONGLY RECOMMENDED: Needed to make KAuth work (using PolicyKit < 0.90), hence to enable some workspace functionalities")
         else (POLKITQT_FOUND)
             macro_optional_find_package(PolkitQt-1)
 
             if (POLKITQT-1_FOUND)
-                set (KAUTH_BACKEND "PolkitQt-1")
+                set (KDE4_AUTH_BACKEND_NAME "PolkitQt-1" CACHE STRING "Specifies the KAuth backend to build. Current available options are 
+                                   PolkitQt, PolkitQt-1, Fake, Apple. Not setting this variable will build the most 
+                                   appropriate backend for your system" FORCE)
                 macro_log_feature(POLKITQT-1_FOUND "PolkitQt-1" "Qt Wrapper around polkit-1" "http://techbase.kde.org/Polkit-Qt-1";
                                   FALSE "" "STRONGLY RECOMMENDED: Needed to make KAuth work (using polkit-1), hence to enable some workspace functionalities")
             else (POLKITQT-1_FOUND)
@@ -31,31 +37,45 @@
                                   FALSE "" "STRONGLY RECOMMENDED: Needed to make KAuth work (using PolicyKit < 0.90), hence to enable some workspace functionalities")
                 macro_log_feature(POLKITQT-1_FOUND "PolkitQt-1" "Qt Wrapper around polkit-1" "http://techbase.kde.org/Polkit-Qt-1";
                                   FALSE "" "STRONGLY RECOMMENDED: Needed to make KAuth work (using polkit-1), hence to enable some workspace functionalities")
-                set (KAUTH_BACKEND "Fake")
+                set (KDE4_AUTH_BACKEND_NAME "Fake" CACHE STRING "Specifies the KAuth backend to build. Current available options are 
+                                   PolkitQt, PolkitQt-1, Fake, Apple. Not setting this variable will build the most 
+                                   appropriate backend for your system" FORCE)
             endif (POLKITQT-1_FOUND)
         endif (POLKITQT_FOUND)
     else(UNIX)
-        set (KAUTH_BACKEND "Fake")
+        set (KDE4_AUTH_BACKEND_NAME "Fake" CACHE STRING "Specifies the KAuth backend to build. Current available options are 
+                                   PolkitQt, PolkitQt-1, Fake, Apple. Not setting this variable will build the most 
+                                   appropriate backend for your system" FORCE)
     endif(APPLE)
 
     # Case-insensitive
-    string(TOUPPER ${KAUTH_BACKEND} KAUTH_BACKEND)
-else(NOT KAUTH_BACKEND)
+    string(TOUPPER ${KDE4_AUTH_BACKEND_NAME} KDE4_AUTH_BACKEND_NAME_UPPER)
+    set (KDE4_AUTH_BACKEND_NAME ${KDE4_AUTH_BACKEND_NAME_UPPER} CACHE STRING "Specifies the KAuth backend to build. Current available options are 
+                                   PolkitQt, PolkitQt-1, Fake, Apple. Not setting this variable will build the most 
+                                   appropriate backend for your system" FORCE)
+else(NOT KDE4_AUTH_BACKEND_NAME)
     # Case-insensitive
-    string(TOUPPER ${KAUTH_BACKEND} KAUTH_BACKEND)
+    string(TOUPPER ${KDE4_AUTH_BACKEND_NAME} KDE4_AUTH_BACKEND_NAME_UPPER)
+    set (KDE4_AUTH_BACKEND_NAME ${KDE4_AUTH_BACKEND_NAME_UPPER} CACHE STRING "Specifies the KAuth backend to build. Current available options are 
+                                   PolkitQt, PolkitQt-1, Fake, Apple. Not setting this variable will build the most 
+                                   appropriate backend for your system" FORCE)
 
     # Check if the specified backend is valid. If it is not, we fall back to the Fake one
-    if (NOT KAUTH_BACKEND STREQUAL "OSX" AND NOT KAUTH_BACKEND STREQUAL "POLKITQT" AND NOT KAUTH_BACKEND STREQUAL "POLKITQT-1" AND NOT KAUTH_BACKEND STREQUAL "FAKE")
-        message ("WARNING: The KAuth Backend ${KAUTH_BACKEND} you specified does not exist. Falling back to Fake backend")
-        set (KAUTH_BACKEND "Fake")
-    endif (NOT KAUTH_BACKEND STREQUAL "OSX" AND NOT KAUTH_BACKEND STREQUAL "POLKITQT" AND NOT KAUTH_BACKEND STREQUAL "POLKITQT-1" AND NOT KAUTH_BACKEND STREQUAL "FAKE")
+    if (NOT KDE4_AUTH_BACKEND_NAME STREQUAL "OSX" AND NOT KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT" AND NOT KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1" AND NOT KDE4_AUTH_BACKEND_NAME STREQUAL "FAKE")
+        message ("WARNING: The KAuth Backend ${KDE4_AUTH_BACKEND_NAME} you specified does not exist. Falling back to Fake backend")
+        set (KDE4_AUTH_BACKEND_NAME "FAKE" CACHE STRING "Specifies the KAuth backend to build. Current available options are 
+                                   PolkitQt, PolkitQt-1, Fake, Apple. Not setting this variable will build the most 
+                                   appropriate backend for your system" FORCE)
+    endif (NOT KDE4_AUTH_BACKEND_NAME STREQUAL "OSX" AND NOT KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT" AND NOT KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1" AND NOT KDE4_AUTH_BACKEND_NAME STREQUAL "FAKE")
 
     # Check requirements for each backend. If not, fall back to the fake one
-    if (KAUTH_BACKEND STREQUAL "OSX" AND NOT APPLE)
+    if (KDE4_AUTH_BACKEND_NAME STREQUAL "OSX" AND NOT APPLE)
         message ("WARNING: You chose the Apple KAuth backend but your system does not support it. Falling back to Fake backend")
-        set (KAUTH_BACKEND "FAKE")
-    endif (KAUTH_BACKEND STREQUAL "OSX" AND NOT APPLE)
-    if (KAUTH_BACKEND STREQUAL "POLKITQT")
+        set (KDE4_AUTH_BACKEND_NAME "FAKE" CACHE STRING "Specifies the KAuth backend to build. Current available options are 
+                                   PolkitQt, PolkitQt-1, Fake, Apple. Not setting this variable will build the most 
+                                   appropriate backend for your system" FORCE)
+    endif (KDE4_AUTH_BACKEND_NAME STREQUAL "OSX" AND NOT APPLE)
+    if (KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT")
         macro_optional_find_package(PolkitQt)
         macro_log_feature(POLKITQT_FOUND "PolkitQt" "Qt Wrapper around Policykit" "http://api.kde.org/polkit-qt";
                           FALSE "" "STRONGLY RECOMMENDED: Needed to make KAuth work, hence to enable some workspace functionalities")
@@ -63,10 +83,12 @@
         if (NOT POLKITQT_FOUND)
             message ("WARNING: You chose the PolkitQt KAuth backend but you don't have PolkitQt installed.
                       Falling back to Fake backend")
-            set (KAUTH_BACKEND "FAKE")
+            set (KDE4_AUTH_BACKEND_NAME "FAKE" CACHE STRING "Specifies the KAuth backend to build. Current available options are 
+                                   PolkitQt, PolkitQt-1, Fake, Apple. Not setting this variable will build the most 
+                                   appropriate backend for your system" FORCE)
         endif (NOT POLKITQT_FOUND)
-    endif (KAUTH_BACKEND STREQUAL "POLKITQT")
-    if (KAUTH_BACKEND STREQUAL "POLKITQT-1")
+    endif (KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT")
+    if (KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1")
         macro_optional_find_package(PolkitQt-1)
         macro_log_feature(POLKITQT-1_FOUND "PolkitQt-1" "Qt Wrapper around polkit-1" "http://techbase.kde.org/Polkit-Qt-1";
                           FALSE "" "STRONGLY RECOMMENDED: Needed to make KAuth work (using polkit-1), hence to enable some workspace functionalities")
@@ -74,17 +96,23 @@
         if (NOT POLKITQT-1_FOUND)
             message ("WARNING: You chose the PolkitQt-1 KAuth backend but you don't have PolkitQt-1 installed.
                       Falling back to Fake backend")
-            set (KAUTH_BACKEND "FAKE")
+            set (KDE4_AUTH_BACKEND_NAME "FAKE" CACHE STRING "Specifies the KAuth backend to build. Current available options are 
+                                   PolkitQt, PolkitQt-1, Fake, Apple. Not setting this variable will build the most 
+                                   appropriate backend for your system" FORCE)
         endif (NOT POLKITQT-1_FOUND)
-    endif (KAUTH_BACKEND STREQUAL "POLKITQT-1")
-endif(NOT KAUTH_BACKEND)
+    endif (KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1")
+endif(NOT KDE4_AUTH_BACKEND_NAME)
 
-# Add the correct libraries depending on the backend
-if(KAUTH_BACKEND STREQUAL "OSX")
+# Add the correct libraries depending on the backend, and eventually set the policy files install location
+if(KDE4_AUTH_BACKEND_NAME STREQUAL "OSX")
     find_library(CORE_FOUNDATION_LIBRARY CoreFoundation)
     find_library(SECURITY_LIBRARY Security)
-elseif(KAUTH_BACKEND STREQUAL "POLKITQT")
+elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT")
     include_directories(${POLKITQT_INCLUDE_DIR})
-elseif(KAUTH_BACKEND STREQUAL "POLKITQT-1")
+    set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR ${POLKITQT_POLICY_FILES_INSTALL_DIR} CACHE STRING 
+        "Where policy files generated by KAuth will be installed" FORCE)
+elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1")
     include_directories(${POLKITQT-1_INCLUDE_DIR})
+    set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR ${POLKITQT-1_POLICY_FILES_INSTALL_DIR} CACHE STRING 
+        "Where policy files generated by KAuth will be installed" FORCE)
 endif()
Index: kdecore/CMakeLists.txt
===================================================================
--- kdecore/CMakeLists.txt	(revisione 1072643)
+++ kdecore/CMakeLists.txt	(copia locale)
@@ -107,7 +107,7 @@
    )
 endif (UNIX)
 
-if (KAUTH_BACKEND STREQUAL "POLKITQT")
+if (KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT")
     message(STATUS "Building PolkitQt KAuth backend")
 
     set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS}
@@ -115,7 +115,7 @@
     )
 
     set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${POLKITQT_CORE_LIBRARY})
-elseif (KAUTH_BACKEND STREQUAL "POLKITQT-1")
+elseif (KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1")
     message(STATUS "Building PolkitQt-1 KAuth backend")
 
     set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS}
@@ -123,7 +123,7 @@
     )
 
     set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${POLKITQT-1_CORE_LIBRARY})
-elseif (KAUTH_BACKEND STREQUAL "OSX")
+elseif (KDE4_AUTH_BACKEND_NAME STREQUAL "OSX")
     message(STATUS "Building Apple KAuth backend")
 
     set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS}
@@ -131,7 +131,7 @@
     )
 
     set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${SECURITY_LIBRARY})
-elseif (KAUTH_BACKEND STREQUAL "FAKE")
+elseif (KDE4_AUTH_BACKEND_NAME STREQUAL "FAKE")
     message(STATUS "Building Fake KAuth backend")
     message("WARNING: KAuth will be built with Fake backend. The library will not work properly unless compiled with
              a working backend")
@@ -378,13 +378,13 @@
 set(kauth_policy_gen_SRCS
     auth/policy-gen/policy-gen.cpp )
 
-if(KAUTH_BACKEND STREQUAL "OSX")
+if(KDE4_AUTH_BACKEND_NAME STREQUAL "OSX")
    set(kauth_policy_gen_SRCS ${kauth_policy_gen_SRCS}
        auth/backends/mac/kauth-policy-gen-mac.cpp )
-elseif(KAUTH_BACKEND STREQUAL "POLKITQT")
+elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT")
    set(kauth_policy_gen_SRCS ${kauth_policy_gen_SRCS}
        auth/backends/policykit/kauth-policy-gen-polkit.cpp )
-elseif(KAUTH_BACKEND STREQUAL "POLKITQT-1")
+elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1")
   set(kauth_policy_gen_SRCS ${kauth_policy_gen_SRCS}
       auth/backends/polkit-1/kauth-policy-gen-polkit1.cpp )
 else()
_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem

Reply via email to