diff options
| author | Allen Winter <allen.winter@kdab.com> | 2011-06-30 17:36:45 -0400 | 
|---|---|---|
| committer | Allen Winter <allen.winter@kdab.com> | 2011-06-30 17:36:45 -0400 | 
| commit | d2b2c90a06bf1f4a21df196430d1f95856900410 (patch) | |
| tree | aba9d2a48d7b2ac1e960e1b68218394524c7e6a8 /attic/modules/FindAkode.cmake | |
| parent | e15ffacc69242c89107afbfda6f8ece9f2b56633 (diff) | |
| download | extra-cmake-modules-d2b2c90a06bf1f4a21df196430d1f95856900410.tar.gz extra-cmake-modules-d2b2c90a06bf1f4a21df196430d1f95856900410.tar.bz2 | |
Move the modules, modules-test and systeminfo subdirs into 'attic'
Diffstat (limited to 'attic/modules/FindAkode.cmake')
| -rw-r--r-- | attic/modules/FindAkode.cmake | 52 | 
1 files changed, 52 insertions, 0 deletions
| diff --git a/attic/modules/FindAkode.cmake b/attic/modules/FindAkode.cmake new file mode 100644 index 00000000..9df503cc --- /dev/null +++ b/attic/modules/FindAkode.cmake @@ -0,0 +1,52 @@ +# - Try to find the aKode library +# Once done this will define +# +#  AKODE_FOUND - system has the aKode library +#  AKODE_INCLUDE_DIR - the aKode include directory +#  AKODE_LIBRARIES - The libraries needed to use aKode + +# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +IF (AKODE_LIBRARIES AND AKODE_INCLUDE_DIR) + +  # in cache already +  SET(AKODE_FOUND TRUE) + +ELSE (AKODE_LIBRARIES AND AKODE_INCLUDE_DIR) + +  FIND_PROGRAM(AKODECONFIG_EXECUTABLE NAMES akode-config)  + +  # if akode-config has been found +  IF (AKODECONFIG_EXECUTABLE) + +    EXEC_PROGRAM(${AKODECONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE AKODE_LIBRARIES) + +    EXEC_PROGRAM(${AKODECONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE AKODE_INCLUDE_DIR) + +    IF (AKODE_LIBRARIES AND AKODE_INCLUDE_DIR) +      SET(AKODE_FOUND TRUE) +      STRING(REGEX REPLACE "-I(.+)" "\\1" AKODE_INCLUDE_DIR "${AKODE_INCLUDE_DIR}") +      message(STATUS "Found aKode: ${AKODE_LIBRARIES}") +    ENDIF (AKODE_LIBRARIES AND AKODE_INCLUDE_DIR) + +    # ensure that they are cached +    set(AKODE_INCLUDE_DIR ${AKODE_INCLUDE_DIR}) +    set(AKODE_LIBRARIES ${AKODE_LIBRARIES}) + +  ENDIF (AKODECONFIG_EXECUTABLE) +  IF(AKODE_FOUND) +    IF(NOT Akode_FIND_QUIETLY) +      MESSAGE(STATUS "Akode found: ${AKODE_LIBRARIES}") +    ENDIF(NOT Akode_FIND_QUIETLY) +  ELSE(AKODE_FOUND) +  IF(Akode_FIND_REQUIRED) +     MESSAGE(FATAL_ERROR "Could not find Akode") +   ENDIF(Akode_FIND_REQUIRED) +  ENDIF(AKODE_FOUND) + +ENDIF (AKODE_LIBRARIES AND AKODE_INCLUDE_DIR) + | 
