~ubuntu-branches/ubuntu/oneiric/k3b/oneiric

« back to all changes in this revision

Viewing changes to cmake/modules/FindMuse.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-03-05 18:46:32 UTC
  • mfrom: (1.1.23 upstream)
  • Revision ID: james.westby@ubuntu.com-20100305184632-uhnjo6k45yi6bkmu
Tags: 1.90.0~rc1-0ubuntu1
* New upstream release
  - Bump kdelibs5-dev to 4.4.1 as required, k3b uses KAuth since this version

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
10
10
#
11
11
 
12
 
 
13
 
IF( MUSE_INCLUDE_DIR AND MUSE_LIBRARIES )
14
 
     # in cache already
15
 
     SET(MUSE_FIND_QUIETLY TRUE)
16
 
ENDIF( MUSE_INCLUDE_DIR AND MUSE_LIBRARIES )
17
 
 
18
 
UNSET( MUSE_INCLUDE_DIR CACHE )
19
 
 
20
 
FIND_PATH( MUSE_INCLUDE_DIR mpc/mpcdec.h )
21
 
if( MUSE_INCLUDE_DIR )
22
 
    FIND_LIBRARY( MUSE_LIBRARIES NAMES mpcdec )
23
 
    SET( MPC_HEADER_FILE "<mpc/mpcdec.h>" )
24
 
else( MUSE_INCLUDE_DIR )
25
 
    FIND_PATH( MUSE_INCLUDE_DIR mpcdec/mpcdec.h )
26
 
    IF( MUSE_INCLUDE_DIR )
27
 
        FIND_LIBRARY( MUSE_LIBRARIES NAMES mpcdec )
28
 
        SET( MPC_HEADER_FILE "<mpcdec/mpcdec.h>" )
29
 
        SET( MPC_OLD_API 1)
30
 
    ELSE( MUSE_INCLUDE_DIR )
31
 
        FIND_PATH( MUSE_INCLUDE_DIR musepack/musepack.h )
32
 
        FIND_LIBRARY( MUSE_LIBRARIES NAMES musepack )
33
 
        SET( MPC_HEADER_FILE "<musepack/musepack.h>" )
34
 
        SET( MPC_OLD_API 1 )
35
 
    ENDIF( MUSE_INCLUDE_DIR )
36
 
ENDIF( MUSE_INCLUDE_DIR )
37
 
 
38
 
IF( MUSE_INCLUDE_DIR AND MUSE_LIBRARIES )
39
 
    SET( MUSE_FOUND TRUE )
40
 
ELSE( MUSE_INCLUDE_DIR AND MUSE_LIBRARIES )
41
 
    SET( MUSE_FOUND FALSE )
42
 
ENDIF( MUSE_INCLUDE_DIR AND MUSE_LIBRARIES )
43
 
 
44
 
INCLUDE(FindPackageHandleStandardArgs)
45
 
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MUSE DEFAULT_MSG MUSE_INCLUDE_DIR MUSE_LIBRARIES MPC_HEADER_FILE )
 
12
if( MUSE_INCLUDE_DIR AND MUSE_LIBRARIES )
 
13
    # in cache already
 
14
    set(MUSE_FIND_QUIETLY TRUE)
 
15
endif( MUSE_INCLUDE_DIR AND MUSE_LIBRARIES )
 
16
 
 
17
include(CheckIncludeFiles)
 
18
check_include_files(mpc/mpcdec.h HAVE_MPC_MPCDEC_H)
 
19
check_include_files(mpcdec/mpcdec.h HAVE_MPCDEC_MPCDEC_H)
 
20
check_include_files(musepack/musepack.h HAVE_MUSEPACK_MUSEPACK_H)
 
21
 
 
22
if( HAVE_MPC_MPCDEC_H )
 
23
    find_path( MUSE_INCLUDE_DIR mpc/mpcdec.h )
 
24
    find_library( MUSE_LIBRARIES NAMES mpcdec )
 
25
    set( MPC_HEADER_FILE "<mpc/mpcdec.h>" )
 
26
elseif( HAVE_MPCDEC_MPCDEC_H )
 
27
    find_path( MUSE_INCLUDE_DIR mpcdec/mpcdec.h )
 
28
    find_library( MUSE_LIBRARIES NAMES mpcdec )
 
29
    set( MPC_HEADER_FILE "<mpcdec/mpcdec.h>" )
 
30
    set( MPC_OLD_API 1)
 
31
elseif( HAVE_MUSEPACK_MUSEPACK_H )
 
32
    find_path( MUSE_INCLUDE_DIR musepack/musepack.h )
 
33
    find_library( MUSE_LIBRARIES NAMES musepack )
 
34
    set( MPC_HEADER_FILE "<musepack/musepack.h>" )
 
35
    set( MPC_OLD_API 1 )
 
36
endif( HAVE_MPC_MPCDEC_H )
 
37
 
 
38
if( MUSE_INCLUDE_DIR AND MUSE_LIBRARIES )
 
39
    set( MUSE_FOUND TRUE )
 
40
else( MUSE_INCLUDE_DIR AND MUSE_LIBRARIES )
 
41
    set( MUSE_FOUND FALSE )
 
42
endif( MUSE_INCLUDE_DIR AND MUSE_LIBRARIES )
 
43
 
 
44
include(FindPackageHandleStandardArgs)
 
45
find_package_handle_standard_args(MUSE DEFAULT_MSG MUSE_INCLUDE_DIR MUSE_LIBRARIES MPC_HEADER_FILE )
46
46
 
47
47
# show the MUSE_INCLUDE_DIR and MUSE_LIBRARIES variables only in the advanced view
48
 
MARK_AS_ADVANCED(MUSE_INCLUDE_DIR MUSE_LIBRARIES )
49
 
 
 
48
mark_as_advanced(MUSE_INCLUDE_DIR MUSE_LIBRARIES )