From f2586846661fd2ef1a999765108298ca41b57256 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 14 Jan 2006 20:15:30 +0000 Subject: -simple cmake modules for detecting libart, OpenSSL, FAM, jasper and PCRE -major improvement of am2cmake: add libtool .la files found in LIBADD to TARGET_LINK_LIBRARIES and fix the loop for adding the libs Alex svn path=/trunk/KDE/kdesdk/cmake/; revision=498154 --- modules/FindLibArt.cmake | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 modules/FindLibArt.cmake (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake new file mode 100644 index 00000000..e170d0e9 --- /dev/null +++ b/modules/FindLibArt.cmake @@ -0,0 +1,27 @@ + +FIND_PATH(LIBART_INCLUDE_DIR libart_lgpl/libart.h +/usr/include/libart-2.0 +/usr/local/include/libart-2.0 +) + +FIND_LIBRARY(LIBART_LIBRARY NAMES art_lgpl_2 +PATHS +/usr/lib +/usr/local/lib +) + + +IF(LIBART_INCLUDE_DIR AND LIBART_LIBRARY) + SET(LIBART_FOUND TRUE) +ENDIF(LIBART_INCLUDE_DIR AND LIBART_LIBRARY) + + +IF(LIBART_FOUND) + IF(NOT LIBART_FIND_QUIETLY) + MESSAGE(STATUS "Found libart: ${LIBART_LIBRARY}") + ENDIF(NOT LIBART_FIND_QUIETLY) +ELSE(LIBART_FOUND) + IF(LIBART_FIND_REQUIRED) + MESSAGE(SEND_ERROR "Could not find libart") + ENDIF(LIBART_FIND_REQUIRED) +ENDIF(LIBART_FOUND) -- cgit v1.2.1 From 0d87c6e52d0dae7cda5b61991089738c95fe8067 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 16 Jan 2006 21:50:40 +0000 Subject: use the new pkg-config cmake module in the libart module the support for pkg-config was added with a custom cmake module (i.e. script, no editing of C++ sources involved) since somebody asked me, whether pkg-config is supported by cmake, ccmail to the mailinglist CCMAIL: kde-buildsystem@kde.org Alex svn path=/trunk/KDE/kdesdk/cmake/; revision=499066 --- modules/FindLibArt.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index e170d0e9..e8bd5a6b 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -1,11 +1,20 @@ +INCLUDE(UsePkgConfig) + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags) + +SET(LIBART_DEFINITIONS ${_libArtCflags}) FIND_PATH(LIBART_INCLUDE_DIR libart_lgpl/libart.h +${_libArtIncDir}/libart-2.0 /usr/include/libart-2.0 /usr/local/include/libart-2.0 ) FIND_LIBRARY(LIBART_LIBRARY NAMES art_lgpl_2 PATHS +${_libArtLinkDir} /usr/lib /usr/local/lib ) -- cgit v1.2.1 From f966ce265b1c469713f7c2543bb81e5cf8b70d13 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 23 Jan 2006 17:41:24 +0000 Subject: -fix Foo_FIND_REQUIRED and Foo_FIND_QUIETYL handling: Alex svn path=/trunk/KDE/kdesdk/cmake/; revision=501687 --- modules/FindLibArt.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index e8bd5a6b..3a716fef 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -26,11 +26,11 @@ ENDIF(LIBART_INCLUDE_DIR AND LIBART_LIBRARY) IF(LIBART_FOUND) - IF(NOT LIBART_FIND_QUIETLY) + IF(NOT LibArt_FIND_QUIETLY) MESSAGE(STATUS "Found libart: ${LIBART_LIBRARY}") - ENDIF(NOT LIBART_FIND_QUIETLY) + ENDIF(NOT LibArt_FIND_QUIETLY) ELSE(LIBART_FOUND) - IF(LIBART_FIND_REQUIRED) + IF(LibArt_FIND_REQUIRED) MESSAGE(SEND_ERROR "Could not find libart") - ENDIF(LIBART_FIND_REQUIRED) + ENDIF(LibArt_FIND_REQUIRED) ENDIF(LIBART_FOUND) -- cgit v1.2.1 From 1d78fb83f0d0c05d0d0bd8b4bbb53747fc55778d Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 25 Jan 2006 20:41:54 +0000 Subject: add the stuff moved from kdesdk, maybe... Alex svn path=/trunk/KDE/kdelibs/; revision=502383 --- modules/FindLibArt.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 3a716fef..35b349fc 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -31,6 +31,6 @@ IF(LIBART_FOUND) ENDIF(NOT LibArt_FIND_QUIETLY) ELSE(LIBART_FOUND) IF(LibArt_FIND_REQUIRED) - MESSAGE(SEND_ERROR "Could not find libart") + MESSAGE(FATAL_ERROR "Could not find libart") ENDIF(LibArt_FIND_REQUIRED) ENDIF(LIBART_FOUND) -- cgit v1.2.1 From cf46a70c5cc373e23ea2075c2a2fb0e41cfffe96 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 11 Feb 2006 20:19:59 +0000 Subject: -changed kde4_create_libtool_file (target dir_relative_to_libdir) to kde4_install_libtool_file(dir_relative_to_install_prefix target) -added variable KDE4_PLUGIN_INSTALL_DIR, used usually for installing plugins -changed am2cmake accordingly -edited FindLibXml2.cmake and FindLibArt so that they work correctly with CMAKE_INSTALL_PATH -changed generated_findpackage_file accordingly -some minor formatting changes Alex CCMAIL: montel@kde.org svn path=/trunk/KDE/kdelibs/; revision=508458 --- modules/FindLibArt.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 35b349fc..da9d68e7 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -6,12 +6,16 @@ PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags SET(LIBART_DEFINITIONS ${_libArtCflags}) -FIND_PATH(LIBART_INCLUDE_DIR libart_lgpl/libart.h -${_libArtIncDir}/libart-2.0 -/usr/include/libart-2.0 -/usr/local/include/libart-2.0 +FIND_PATH(LIBART_ROOT_INCLUDE_DIR libart-2.0/libart_lgpl/libart.h + ${_libArtIncDir} + /usr/include + /usr/local/include ) +SET(LIBART_INCLUDE_DIR ${LIBART_ROOT_INCLUDE_DIR}/libart-2.0 CACHE PATH "LibArt include directory") + +MARK_AS_ADVANCED(LIBART_ROOT_INCLUDE_DIR) + FIND_LIBRARY(LIBART_LIBRARY NAMES art_lgpl_2 PATHS ${_libArtLinkDir} -- cgit v1.2.1 From 75a07dd38b4a491a9d16d24492bea5c6ba90a8ff Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 12 Feb 2006 14:38:04 +0000 Subject: -moved the cmake code to find kdewin32 out of FindKDE4.cmake and into its own FindKDEWIN32.cmake file -added a new FindGNUWIN32.cmake file, which tries to find the gnuwin32 base directory -changed all "FOO_LIBRARY" variable names to "FOO_LIBRARIES" to be more consistent with the other cmake modules -added a macro_getenv_win_path() which replaces all backslahes with slashes from environment variables -modified the kde4_add_kcfg_files() command, so that the generated header is also processed by moc -all tests compile and link Alex CCMAIL:kde-buildsystem@kde.org The changes to the windows stuff are untested, since I don't have a windows box. Please check that everything still works. Please have a look at FindGNUWIN32.cmake, there are probably ways to improve this. The resulting GNUWIN32_DIR variable is used in other cmake modules as default path to search for headers and libraries. svn path=/trunk/KDE/kdelibs/; revision=508648 --- modules/FindLibArt.cmake | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index da9d68e7..967e8818 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -1,3 +1,14 @@ +# - Try to find the LibArt 2D graphics library +# Once done this will define +# +# LIBART_FOUND - system has the LibArt +# LIBART_INCLUDE_DIR - the LibArt include directory +# LIBART_LIBRARIES - The libraries needed to use LibArt +# under Windows this also checks in the GNUWIN32 directory, so make +# sure that the GNUWIN32 directory gets found if you use the GNUWIN32 version of PCRE +# under UNIX pkgconfig among others pkg-config is used to find the directories + + INCLUDE(UsePkgConfig) # use pkg-config to get the directories and then use these values @@ -6,35 +17,39 @@ PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags SET(LIBART_DEFINITIONS ${_libArtCflags}) -FIND_PATH(LIBART_ROOT_INCLUDE_DIR libart-2.0/libart_lgpl/libart.h - ${_libArtIncDir} - /usr/include - /usr/local/include -) - -SET(LIBART_INCLUDE_DIR ${LIBART_ROOT_INCLUDE_DIR}/libart-2.0 CACHE PATH "LibArt include directory") +# under windows, try to find the base gnuwin32 directory, do nothing under UNIX +FIND_PACKAGE(GNUWIN32) -MARK_AS_ADVANCED(LIBART_ROOT_INCLUDE_DIR) +FIND_PATH(LIBART_INCLUDE_DIR libart_lgpl/libart.h + ${_libArtIncDir}/libart-2.0 + /usr/include/libart-2.0 + /usr/local/include/libart-2.0 + ${GNUWIN32_DIR}/include +) -FIND_LIBRARY(LIBART_LIBRARY NAMES art_lgpl_2 -PATHS -${_libArtLinkDir} -/usr/lib -/usr/local/lib +FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 + PATHS + ${_libArtLinkDir} + /usr/lib + /usr/local/lib + ${GNUWIN32_DIR}/lib ) -IF(LIBART_INCLUDE_DIR AND LIBART_LIBRARY) +IF(LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) SET(LIBART_FOUND TRUE) -ENDIF(LIBART_INCLUDE_DIR AND LIBART_LIBRARY) +ENDIF(LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) IF(LIBART_FOUND) IF(NOT LibArt_FIND_QUIETLY) - MESSAGE(STATUS "Found libart: ${LIBART_LIBRARY}") + MESSAGE(STATUS "Found libart: ${LIBART_LIBRARIES}") ENDIF(NOT LibArt_FIND_QUIETLY) ELSE(LIBART_FOUND) IF(LibArt_FIND_REQUIRED) MESSAGE(FATAL_ERROR "Could not find libart") ENDIF(LibArt_FIND_REQUIRED) ENDIF(LIBART_FOUND) + +MARK_AS_ADVANCED(LIBART_INCLUDE_DIR LIBART_LIBRARIES) + -- cgit v1.2.1 From ffc69376dc591eae7b0ed2e974a599fb1b8b2aa8 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 15 Feb 2006 10:47:36 +0000 Subject: Lowercase some common keywords to improve readability svn path=/trunk/KDE/kdelibs/; revision=509624 --- modules/FindLibArt.cmake | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 967e8818..e0226d6c 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -15,7 +15,7 @@ INCLUDE(UsePkgConfig) # in the FIND_PATH() and FIND_LIBRARY() calls PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags) -SET(LIBART_DEFINITIONS ${_libArtCflags}) +set(LIBART_DEFINITIONS ${_libArtCflags}) # under windows, try to find the base gnuwin32 directory, do nothing under UNIX FIND_PACKAGE(GNUWIN32) @@ -36,20 +36,20 @@ FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 ) -IF(LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) - SET(LIBART_FOUND TRUE) -ENDIF(LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) +if(LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) + set(LIBART_FOUND TRUE) +endif(LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) -IF(LIBART_FOUND) - IF(NOT LibArt_FIND_QUIETLY) - MESSAGE(STATUS "Found libart: ${LIBART_LIBRARIES}") - ENDIF(NOT LibArt_FIND_QUIETLY) -ELSE(LIBART_FOUND) - IF(LibArt_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find libart") - ENDIF(LibArt_FIND_REQUIRED) -ENDIF(LIBART_FOUND) +if(LIBART_FOUND) + if(not LibArt_FIND_QUIETLY) + message(STATUS "Found libart: ${LIBART_LIBRARIES}") + endif(not LibArt_FIND_QUIETLY) +else(LIBART_FOUND) + if(LibArt_FIND_REQUIRED) + message(FATAL_ERROR "Could not find libart") + endif(LibArt_FIND_REQUIRED) +endif(LIBART_FOUND) MARK_AS_ADVANCED(LIBART_INCLUDE_DIR LIBART_LIBRARIES) -- cgit v1.2.1 From eaad615ee85800bedbf2088326399027c95d0740 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 15 Feb 2006 10:49:53 +0000 Subject: Hmm, "NOT" can't be lowercased. I tested before lowercasing that last one, of course... svn path=/trunk/KDE/kdelibs/; revision=509625 --- modules/FindLibArt.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index e0226d6c..a04495ca 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -42,12 +42,12 @@ endif(LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) if(LIBART_FOUND) - if(not LibArt_FIND_QUIETLY) + if(NOT LibArt_FIND_QUIETLY) message(STATUS "Found libart: ${LIBART_LIBRARIES}") - endif(not LibArt_FIND_QUIETLY) + endif(NOT LibArt_FIND_QUIETLY) else(LIBART_FOUND) if(LibArt_FIND_REQUIRED) - message(FATAL_ERROR "Could not find libart") + message(FATAL_ERROR "Could NOT find libart") endif(LibArt_FIND_REQUIRED) endif(LIBART_FOUND) -- cgit v1.2.1 From 191846e3e21c697c28bd5c8a166edeb4072161e3 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Mon, 20 Mar 2006 21:05:37 +0000 Subject: minor cleanups: indenting, adding newline to end of file, etc. svn path=/trunk/KDE/kdelibs/; revision=520790 --- modules/FindLibArt.cmake | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index a04495ca..05d278b1 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -36,20 +36,20 @@ FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 ) -if(LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) +if (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) set(LIBART_FOUND TRUE) -endif(LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) +endif (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) -if(LIBART_FOUND) - if(NOT LibArt_FIND_QUIETLY) +if (LIBART_FOUND) + if (NOT LibArt_FIND_QUIETLY) message(STATUS "Found libart: ${LIBART_LIBRARIES}") - endif(NOT LibArt_FIND_QUIETLY) -else(LIBART_FOUND) - if(LibArt_FIND_REQUIRED) + endif (NOT LibArt_FIND_QUIETLY) +else (LIBART_FOUND) + if (LibArt_FIND_REQUIRED) message(FATAL_ERROR "Could NOT find libart") - endif(LibArt_FIND_REQUIRED) -endif(LIBART_FOUND) + endif (LibArt_FIND_REQUIRED) +endif (LIBART_FOUND) MARK_AS_ADVANCED(LIBART_INCLUDE_DIR LIBART_LIBRARIES) -- cgit v1.2.1 From cba8933a83c2e96698b85b980438f30385f8420e Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sat, 8 Apr 2006 22:43:16 +0000 Subject: optimized gnuwin32 detection on windows - find gnuwin32 package location very early - removed GNUWIN32_INCLUDE_DIR/GNUWIN32_LIBRARY_DIR macros, because FindGNUWIN32.cmake sets now CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH - don't use pkgconfig on windows svn path=/trunk/KDE/kdelibs/; revision=527634 --- modules/FindLibArt.cmake | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 05d278b1..c1528bb3 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -4,27 +4,19 @@ # LIBART_FOUND - system has the LibArt # LIBART_INCLUDE_DIR - the LibArt include directory # LIBART_LIBRARIES - The libraries needed to use LibArt -# under Windows this also checks in the GNUWIN32 directory, so make -# sure that the GNUWIN32 directory gets found if you use the GNUWIN32 version of PCRE -# under UNIX pkgconfig among others pkg-config is used to find the directories - -INCLUDE(UsePkgConfig) - -# use pkg-config to get the directories and then use these values -# in the FIND_PATH() and FIND_LIBRARY() calls -PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags) - -set(LIBART_DEFINITIONS ${_libArtCflags}) - -# under windows, try to find the base gnuwin32 directory, do nothing under UNIX -FIND_PACKAGE(GNUWIN32) +IF (NOT WIN32) + INCLUDE(UsePkgConfig) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags) + set(LIBART_DEFINITIONS ${_libArtCflags}) +ENDIF (NOT WIN32) FIND_PATH(LIBART_INCLUDE_DIR libart_lgpl/libart.h ${_libArtIncDir}/libart-2.0 /usr/include/libart-2.0 /usr/local/include/libart-2.0 - ${GNUWIN32_DIR}/include ) FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 @@ -32,7 +24,6 @@ FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 ${_libArtLinkDir} /usr/lib /usr/local/lib - ${GNUWIN32_DIR}/lib ) -- cgit v1.2.1 From 968fec0a7b604bb1c463aae6ff7bb9726407af72 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 14 Apr 2006 11:49:02 +0000 Subject: Actually use the cache whenever possible. Should speed up the re-configuring that happens so often. svn path=/trunk/KDE/kdelibs/; revision=529759 --- modules/FindLibArt.cmake | 92 ++++++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 39 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index c1528bb3..430facb5 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -5,42 +5,56 @@ # LIBART_INCLUDE_DIR - the LibArt include directory # LIBART_LIBRARIES - The libraries needed to use LibArt -IF (NOT WIN32) - INCLUDE(UsePkgConfig) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags) - set(LIBART_DEFINITIONS ${_libArtCflags}) -ENDIF (NOT WIN32) - -FIND_PATH(LIBART_INCLUDE_DIR libart_lgpl/libart.h - ${_libArtIncDir}/libart-2.0 - /usr/include/libart-2.0 - /usr/local/include/libart-2.0 -) - -FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 - PATHS - ${_libArtLinkDir} - /usr/lib - /usr/local/lib -) - - -if (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) - set(LIBART_FOUND TRUE) -endif (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) - - -if (LIBART_FOUND) - if (NOT LibArt_FIND_QUIETLY) - message(STATUS "Found libart: ${LIBART_LIBRARIES}") - endif (NOT LibArt_FIND_QUIETLY) -else (LIBART_FOUND) - if (LibArt_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find libart") - endif (LibArt_FIND_REQUIRED) -endif (LIBART_FOUND) - -MARK_AS_ADVANCED(LIBART_INCLUDE_DIR LIBART_LIBRARIES) - +IF (CACHED_LIBART) + + # in cache already + IF ("${CACHED_LIBART}" STREQUAL "YES") + SET(LIBART_FOUND TRUE) + ENDIF ("${CACHED_LIBART}" STREQUAL "YES") + +ELSE (CACHED_LIBART) + + IF (NOT WIN32) + INCLUDE(UsePkgConfig) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags) + set(LIBART_DEFINITIONS ${_libArtCflags}) + ENDIF (NOT WIN32) + + FIND_PATH(LIBART_INCLUDE_DIR libart_lgpl/libart.h + ${_libArtIncDir}/libart-2.0 + /usr/include/libart-2.0 + /usr/local/include/libart-2.0 + ) + + FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 + PATHS + ${_libArtLinkDir} + /usr/lib + /usr/local/lib + ) + + + if (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) + set(LIBART_FOUND TRUE) + set(CACHED_LIBART "YES") + else (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) + set(CACHED_LIBART "NO") + endif (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) + + + if (LIBART_FOUND) + if (NOT LibArt_FIND_QUIETLY) + message(STATUS "Found libart: ${LIBART_LIBRARIES}") + endif (NOT LibArt_FIND_QUIETLY) + else (LIBART_FOUND) + if (LibArt_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find libart") + endif (LibArt_FIND_REQUIRED) + endif (LIBART_FOUND) + + set(CACHED_LIBART ${CACHED_LIBART} CACHE INTERNAL "If libart was checked") + MARK_AS_ADVANCED(LIBART_INCLUDE_DIR LIBART_LIBRARIES) + +ENDIF (CACHED_LIBART) -- cgit v1.2.1 From 2b43aad081d13bdeb2ed8a65f65fbecfb470da0d Mon Sep 17 00:00:00 2001 From: David Faure Date: Tue, 18 Apr 2006 11:22:38 +0000 Subject: More use of the cache; fixing previous commit to not recheck everytime when something isn't available (e.g. agg for me). svn path=/trunk/KDE/kdelibs/; revision=531000 --- modules/FindLibArt.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 430facb5..0ae2c49c 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -5,14 +5,14 @@ # LIBART_INCLUDE_DIR - the LibArt include directory # LIBART_LIBRARIES - The libraries needed to use LibArt -IF (CACHED_LIBART) +IF (DEFINED CACHED_LIBART) # in cache already IF ("${CACHED_LIBART}" STREQUAL "YES") SET(LIBART_FOUND TRUE) ENDIF ("${CACHED_LIBART}" STREQUAL "YES") -ELSE (CACHED_LIBART) +ELSE (DEFINED CACHED_LIBART) IF (NOT WIN32) INCLUDE(UsePkgConfig) @@ -57,4 +57,4 @@ ELSE (CACHED_LIBART) set(CACHED_LIBART ${CACHED_LIBART} CACHE INTERNAL "If libart was checked") MARK_AS_ADVANCED(LIBART_INCLUDE_DIR LIBART_LIBRARIES) -ENDIF (CACHED_LIBART) +ENDIF (DEFINED CACHED_LIBART) -- cgit v1.2.1 From 9a75f145de53a04eca02dd5da5c2ab092f67d2f0 Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 20 Apr 2006 12:25:46 +0000 Subject: OK so FIND_PATH and FIND_LIBRARIES use the cache already, so no need for the CACHED_FOO fast-path when the check only uses those. Instead I used this, to avoid "Found libfoo" in the output when in fact we didn't just look for it, we had it in the cache. +if (TIFF_INCLUDE_DIR) + # Already in cache, be silent + set(TIFF_FIND_QUIETLY TRUE) +endif (TIFF_INCLUDE_DIR) CACHED_FOO remains for the cases where there is more logic to the configure check, like PKGCONFIG, foo-config, or CHECK_LIBRARY_EXISTS (e.g. bzip2) CCMAIL: kde-buildsystem@kde.org svn path=/trunk/KDE/kdelibs/; revision=531839 --- modules/FindLibArt.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 0ae2c49c..b74da7ee 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -19,6 +19,8 @@ ELSE (DEFINED CACHED_LIBART) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags) + + ######### ?? where is this used ?? ############### set(LIBART_DEFINITIONS ${_libArtCflags}) ENDIF (NOT WIN32) -- cgit v1.2.1 From a1cd53cff402332c1bcf7a625b33d9330a247608 Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 11 May 2006 16:56:59 +0000 Subject: Remove my CACHED_ hacks which break when people install libxml2 after seeing the error message about it - only use the cache when the check was previously successful, as discussed. svn path=/trunk/KDE/kdelibs/; revision=539759 --- modules/FindLibArt.cmake | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index b74da7ee..38f43e5d 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -5,14 +5,12 @@ # LIBART_INCLUDE_DIR - the LibArt include directory # LIBART_LIBRARIES - The libraries needed to use LibArt -IF (DEFINED CACHED_LIBART) +if (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) # in cache already - IF ("${CACHED_LIBART}" STREQUAL "YES") - SET(LIBART_FOUND TRUE) - ENDIF ("${CACHED_LIBART}" STREQUAL "YES") + SET(LIBART_FOUND TRUE) -ELSE (DEFINED CACHED_LIBART) +else (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) IF (NOT WIN32) INCLUDE(UsePkgConfig) @@ -40,9 +38,6 @@ ELSE (DEFINED CACHED_LIBART) if (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) set(LIBART_FOUND TRUE) - set(CACHED_LIBART "YES") - else (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) - set(CACHED_LIBART "NO") endif (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) @@ -56,7 +51,6 @@ ELSE (DEFINED CACHED_LIBART) endif (LibArt_FIND_REQUIRED) endif (LIBART_FOUND) - set(CACHED_LIBART ${CACHED_LIBART} CACHE INTERNAL "If libart was checked") MARK_AS_ADVANCED(LIBART_INCLUDE_DIR LIBART_LIBRARIES) -ENDIF (DEFINED CACHED_LIBART) +endif (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) -- cgit v1.2.1 From c778596920e0d5357f216c885e35b4f97d371a23 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 9 Sep 2006 10:18:35 +0000 Subject: added copyright notice everywhere. Now they all are BSD-licensed, as copyright holder I inserted everywhere the one who added it to svn (or Kitware if it is an enhanced copy from taken cmake) Some developers committed quite often but were not the ones who added the file, if you feel you have also copyright on the file add your name in the specific file. Copyright holders: CCMAIL: montel@kde.org CCMAIL: toscano.pino@tiscali.it CCMAIL: adymo@kdevelop.org CCMAIL: ranger@befunk.com CCMAIL: zack@kde.org CCMAIL: caslav.ilic@gmx.net CCMAIL: syntheticpp@yahoo.com CCMAIL: js@iidea.pl CCMAIL: michael.larouche@kdemail.net CCMAIL: ossi@kde.org CCMAIL: faure@kde.org Committers, but no files added so that they are not listed as copyright holders: CCMAIL: ch.ehrlicher@gmx.de CCMAIL: winter@kde.org CCMAIL: ralf.habacker@freenet.de CCMAIL: moura@kdewebdev.org CCMAIL: kde-buildsystem@kde.org Alex svn path=/trunk/KDE/kdelibs/; revision=582410 --- modules/FindLibArt.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 38f43e5d..dacd4b2f 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -4,6 +4,12 @@ # LIBART_FOUND - system has the LibArt # LIBART_INCLUDE_DIR - the LibArt include directory # LIBART_LIBRARIES - The libraries needed to use LibArt +# +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + if (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) -- cgit v1.2.1 From 4ed58bd8160e73a6b66d1ac1a44a67c0d7e062be Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Mon, 6 Aug 2007 17:26:45 +0000 Subject: Remove not necessary path svn path=/trunk/KDE/kdelibs/; revision=697062 --- modules/FindLibArt.cmake | 2 -- 1 file changed, 2 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index dacd4b2f..86282196 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -37,8 +37,6 @@ else (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 PATHS ${_libArtLinkDir} - /usr/lib - /usr/local/lib ) -- cgit v1.2.1 From 814455b7ad321c88e730662fda58261087b72e72 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 18 Feb 2008 19:06:32 +0000 Subject: some improvements to the docs: -some modules were not at all documented, only few are left now -the copyright message doesn't have to be printed for every module in the docs -fix FindKorundom.cmake, it didn't follow the style guide and had typos (e.g. Korumdum_FOUND instead of KORUNDUM_FOUND) Alex (will commit modified FindKDE4Internal.cmake after Christians commit) svn path=/trunk/KDE/kdelibs/; revision=776742 --- modules/FindLibArt.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 86282196..59687877 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -4,7 +4,7 @@ # LIBART_FOUND - system has the LibArt # LIBART_INCLUDE_DIR - the LibArt include directory # LIBART_LIBRARIES - The libraries needed to use LibArt -# + # Copyright (c) 2006, Alexander Neundorf, # # Redistribution and use is allowed according to the terms of the BSD license. -- cgit v1.2.1 From d69178fdea07d3f16dd8aa368f28aa20a83d3015 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 11 Nov 2008 12:38:50 +0000 Subject: Port them too svn path=/trunk/KDE/kdelibs/; revision=882802 --- modules/FindLibArt.cmake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 59687877..13191d23 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -19,24 +19,25 @@ if (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) else (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) IF (NOT WIN32) - INCLUDE(UsePkgConfig) + find_package(PkgConfig) + # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls - PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags) + pkg_check_modules(LIBART libart-2.0) ######### ?? where is this used ?? ############### - set(LIBART_DEFINITIONS ${_libArtCflags}) + set(LIBART_DEFINITIONS ${LIBART_CFLAGS}) ENDIF (NOT WIN32) FIND_PATH(LIBART_INCLUDE_DIR libart_lgpl/libart.h - ${_libArtIncDir}/libart-2.0 + ${LIBART_INCLUDE_DIRS}/libart-2.0 /usr/include/libart-2.0 /usr/local/include/libart-2.0 ) FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 PATHS - ${_libArtLinkDir} + ${LIBART_LIBRARY_DIRS} ) -- cgit v1.2.1 From 877046103ca395ba7b2d842fd00404869e54bef0 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 18 Nov 2008 21:58:50 +0000 Subject: -use the prefix PC_ for the variables coming from pkgconfig (these three modules were working correctly, this is just to establish a convention how to deal with this) Alex svn path=/trunk/KDE/kdelibs/; revision=886256 --- modules/FindLibArt.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 13191d23..d886eeb1 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -23,21 +23,21 @@ else (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls - pkg_check_modules(LIBART libart-2.0) + pkg_check_modules(PC_LIBART libart-2.0) ######### ?? where is this used ?? ############### - set(LIBART_DEFINITIONS ${LIBART_CFLAGS}) + set(LIBART_DEFINITIONS ${PC_LIBART_CFLAGS}) ENDIF (NOT WIN32) - FIND_PATH(LIBART_INCLUDE_DIR libart_lgpl/libart.h - ${LIBART_INCLUDE_DIRS}/libart-2.0 - /usr/include/libart-2.0 - /usr/local/include/libart-2.0 + FIND_PATH(LIBART_INCLUDE_DIR NAMES libart_lgpl/libart.h + PATHS + ${PC_LIBART_INCLUDE_DIRS} + PATH_SUFFIXES libart-2.0 ) FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 PATHS - ${LIBART_LIBRARY_DIRS} + ${PC_LIBART_LIBRARY_DIRS} ) -- cgit v1.2.1 From c379d4c4e0655fac2dadd4be57e2e5cd23d40572 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 2 Dec 2008 21:49:01 +0000 Subject: -rework all uses of find_package(PkgConfig)/pkg_check_modules(): the prefix used for pkgconfig config (e.g. SQLITE) now *always* gets an additional "PC_" prefix, so the prefix used for pkgconfig is now "PC_SQLITE_". This avoids name clashes between variables defined by the pkgconfig macro and the find module and unwanted effects. *Never* use the _CFLAGS coming from pkgconfig, but always CFLAGS_OTHER, since these shouldn't contain the include directories. If the include directories would be in the DEFINITIONS variable this could clash with the results of find_path() for finding include dirs. *Always* use both foo_INCLUDEDIR, foo_INCLUDE_DIRS for searching the include dir, and also both foo_LIBDIR and foo_LIBRARY_DIRS for searching the libraries. These directories coming from pkgconfig are *never* used exclusively, but *always* additionally to the standard search dirs, either before them (then using the "HINTS" keyword) or after them (then using the "PATHS" keyword) I hope I didn't break (too much) stuff. At least on my system it all seems to work the same way as it did before, with and without pkgconfig. Alex svn path=/trunk/KDE/kdelibs/; revision=891805 --- modules/FindLibArt.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index d886eeb1..99eaff65 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -26,17 +26,19 @@ else (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) pkg_check_modules(PC_LIBART libart-2.0) ######### ?? where is this used ?? ############### - set(LIBART_DEFINITIONS ${PC_LIBART_CFLAGS}) + set(LIBART_DEFINITIONS ${PC_LIBART_CFLAGS_OTHER}) ENDIF (NOT WIN32) FIND_PATH(LIBART_INCLUDE_DIR NAMES libart_lgpl/libart.h PATHS + ${PC_LIBART_INCLUDEDIR} ${PC_LIBART_INCLUDE_DIRS} PATH_SUFFIXES libart-2.0 ) FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 PATHS + ${PC_LIBART_LIBDIR} ${PC_LIBART_LIBRARY_DIRS} ) -- cgit v1.2.1 From ac954219018fac1c1cae99b6e69be9438e452233 Mon Sep 17 00:00:00 2001 From: David Jarvie Date: Wed, 11 Mar 2009 22:39:22 +0000 Subject: Suppress 'not found' messages from pkgconfig when the module subsequently attempts to locate the package by other means. svn path=/trunk/KDE/kdelibs/; revision=938476 --- modules/FindLibArt.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 99eaff65..b14cd9db 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -23,7 +23,7 @@ else (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls - pkg_check_modules(PC_LIBART libart-2.0) + pkg_check_modules(PC_LIBART QUIET libart-2.0) ######### ?? where is this used ?? ############### set(LIBART_DEFINITIONS ${PC_LIBART_CFLAGS_OTHER}) -- cgit v1.2.1