Hi Alex, I'm sorry, I wasn't aware of the CMake policy. In hindsight it makes a lot of sense. Please excuse my ignorance.
Alexander Neundorf wrote: > Hi Frederik, <snip> > I just noticed that you added a cmake module FindAttica.cmake to > kdelibs/cmake/modules/, which is also installed. > > When working with the cmake modules in kdelibs, the commit policy should > be followed: http://techbase.kde.org/Policies/CMake_Commit_Policy > (first rule there says "new files must be sent to kde-buildsystem@kde.org > for review. They may only be added after an explicit Ok.") > > You did not do that and from you emails about moving it to kdereview it > also was not obvious that it involves the cmake modules for kdelibs. > > Why is that important... > Adding a module to kdelibs which is also installed means you add a part of > the public API which must be kept compatible for all of KDE 4. > So installing such a file comes with a cost. > > I had a look at the file as it is now, and it is not good. > > It does not work at all on Windows, it used pkg-config in a bad and > documented as such) way. It cannot stay as it is now. > Please have a look e.g. at FindLibXml2.cmake for a proper example how to > use pkg-config in a cmake module. Please see the attached FindAttica.cmake if it is in better shape. As total cmake noob, I'm not sure if it's ok now. > Next question: is this module actually necessary at all ? > Who are the users of it ? You are right, that so far no applications use attica, but I have a branch where KHotNewStuff uses it to implement many features that have been requested ages ago. I'd like to merge that to kdelibs in the very near future. Two plasma applets and Amarok have local copies of this library at the moment and are waiting for a real library. Greetings Frederik
# Try to find the Attica library # Once done this will define # # ATTICA_FOUND Indicates that Attica was found # ATTICA_LIBRARIES Libraries needed to use Attica # ATTICA_LIBRARY_DIRS Paths needed for linking against Attica # ATTICA_INCLUDE_DIRS Paths needed for finding Attica include files # # Copyright (c) 2009 Frederik Gladhorn <gladh...@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. IF (ATTICA_INCLUDE_DIR AND ATTICA_LIBRARIES) # in cache already SET(Attica_FIND_QUIETLY TRUE) ENDIF (ATTICA_INCLUDE_DIR AND ATTICA_LIBRARIES) IF (NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls FIND_PACKAGE(PkgConfig) PKG_CHECK_MODULES(PC_ATTICA QUIET libattica-0.1) SET(ATTICA_DEFINITIONS ${PC_ATTICA_CFLAGS_OTHER}) ENDIF (NOT WIN32) FIND_PATH(ATTICA_INCLUDE_DIR attica/provider.h HINTS ${PC_ATTICA_INCLUDEDIR} ${PC_ATTICA_INCLUDE_DIRS} PATH_SUFFIXES attica ) FIND_LIBRARY(ATTICA_LIBRARIES NAMES attica libattica HINTS ${PC_ATTICA_LIBDIR} ${PC_ATTICA_LIBRARY_DIRS} ) INCLUDE(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set ATTICA_FOUND to TRUE if # all listed variables are TRUE FIND_PACKAGE_HANDLE_STANDARD_ARGS(libattica DEFAULT_MSG ATTICA_LIBRARIES ATTICA_INCLUDE_DIR) MARK_AS_ADVANCED(ATTICA_INCLUDE_DIR ATTICA_LIBRARIES)
_______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem