1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-30 09:10:53 +02:00

Some more cleanup in FindJreen.cmake

This commit is contained in:
Dominik Schmidt
2012-03-15 02:11:19 +01:00
parent b2779a9b6a
commit 8503f5bbe3
2 changed files with 7 additions and 9 deletions

View File

@@ -8,7 +8,7 @@
FIND_PACKAGE(PkgConfig QUIET)
PKG_CHECK_MODULES(PC_JREEN QUIET libjreen)
FIND_PATH(LIBJREEN_INCLUDE_DIR NAMES jreen/jreen.h
FIND_PATH(JREEN_INCLUDE_DIR NAMES jreen/jreen.h
HINTS
${PC_JREEN_INCLUDEDIR}
${PC_JREEN_INCLUDE_DIRS}
@@ -16,7 +16,7 @@ FIND_PATH(LIBJREEN_INCLUDE_DIR NAMES jreen/jreen.h
${KDE4_INCLUDE_DIR}
)
FIND_LIBRARY(LIBJREEN_LIBRARY NAMES jreen
FIND_LIBRARY(JREEN_LIBRARIES NAMES jreen
HINTS
${PC_JREEN_LIBDIR}
${PC_JREEN_LIBRARY_DIRS}
@@ -24,15 +24,13 @@ FIND_LIBRARY(LIBJREEN_LIBRARY NAMES jreen
${KDE4_LIB_DIR}
)
IF(PC_JREEN_VERSION)
SET(JREEN_VERSION_STRING ${PC_JREEN_VERSION})
ELSE()
IF(JREEN_LIBRARIES AND JREEN_INCLUDE_DIR AND NOT PC_JREEN_VERSION)
MESSAGE(WARNING "You don't have pkg-config the Jreen version check does not work!")
ENDIF()
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jreen
REQUIRED_VARS JREEN_LIBRARIES JREEN_INCLUDE_DIR
VERSION_VAR JREEN_VERSION_STRING)
VERSION_VAR PC_JREEN_VERSION)
MARK_AS_ADVANCED(JREEN_INCLUDE_DIR JREEN_LIBRARY)
MARK_AS_ADVANCED(JREEN_INCLUDE_DIR JREEN_LIBRARIES)