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/FindBZip2.cmake | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'modules/FindBZip2.cmake') diff --git a/modules/FindBZip2.cmake b/modules/FindBZip2.cmake index 3f4e493d..21f4a825 100644 --- a/modules/FindBZip2.cmake +++ b/modules/FindBZip2.cmake @@ -3,7 +3,7 @@ # # BZIP2_FOUND - system has BZip2 # BZIP2_INCLUDE_DIR - the BZip2 include directory -# BZIP2_LIBRARY - Link these to use OpenGL and GLU +# BZIP2_LIBRARIES - Link these to use BZip2 # BZIP2_DEFINITIONS - Compiler switches required for using BZip2 # BZIP2_NEED_PREFIX - this is set if the functions are prefixed with BZ2_ # @@ -14,21 +14,21 @@ FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h /usr/local/include ) -FIND_LIBRARY(BZIP2_LIBRARY NAMES bz2 bzip2 +FIND_LIBRARY(BZIP2_LIBRARIES NAMES bz2 bzip2 PATHS /usr/lib /usr/local/lib ) -IF(BZIP2_INCLUDE_DIR AND BZIP2_LIBRARY) +IF(BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES) SET(BZIP2_FOUND TRUE) INCLUDE(CheckLibraryExists) - check_library_exists(${BZIP2_LIBRARY} BZ2_bzCompressInit "" BZIP2_NEED_PREFIX) -ENDIF(BZIP2_INCLUDE_DIR AND BZIP2_LIBRARY) + CHECK_LIBRARY_EXISTS(${BZIP2_LIBRARIES} BZ2_bzCompressInit "" BZIP2_NEED_PREFIX) +ENDIF(BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES) IF(BZIP2_FOUND) IF(NOT BZip2_FIND_QUIETLY) - MESSAGE(STATUS "Found BZip2: ${BZIP2_LIBRARY}") + MESSAGE(STATUS "Found BZip2: ${BZIP2_LIBRARIES}") ENDIF(NOT BZip2_FIND_QUIETLY) ELSE(BZIP2_FOUND) IF(BZip2_FIND_REQUIRED) @@ -36,3 +36,4 @@ ELSE(BZIP2_FOUND) ENDIF(BZip2_FIND_REQUIRED) ENDIF(BZIP2_FOUND) +MARK_AS_ADVANCED(BZIP2_INCLUDE_DIR BZIP2_LIBRARIES) -- cgit v1.2.1