summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake33
1 files changed, 31 insertions, 2 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 447bce0..de3a111 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -105,12 +105,41 @@ IF(WANT_SOUND)
#MESSAGE("LRDF_INC_DIR: ${LRDF_INC_DIR}")
ENDIF(LRDF_FOUND)
- FIND_PACKAGE(LADSPA QUIET)
+ ##################################################################
+ # - Try to find LADSPA header
+ # Once done this will define:
+ #
+ # LADSPA_FOUND - system has LADSPA
+ # LADSPA_INCLUDE_DIR - LADSPA header path
+ IF(LADSPA_INCLUDE_DIR)
+ SET(LADSPA_FIND_QUIETLY TRUE)
+ ENDIF(LADSPA_INCLUDE_DIR)
+ FIND_PATH(LADSPA_INCLUDE_DIR "ladspa.h"
+ /usr/include
+ /usr/local/include
+ )
+ IF(LADSPA_INCLUDE_DIR)
+ SET(LADSPA_FOUND TRUE)
+ ELSE(LADSPA_INCLUDE_DIR)
+ SET(LADSPA_FOUND FALSE)
+ SET(LADSPA_INCLUDE_DIR "")
+ ENDIF(LADSPA_INCLUDE_DIR)
+ IF(LADSPA_FOUND)
+ IF(NOT LADSPA_FIND_QUIETLY)
+ MESSAGE(STATUS "Found LADSPA: ${LADSPA_INCLUDE_DIR}")
+ ENDIF(NOT LADSPA_FIND_QUIETLY)
+ ELSE(LADSPA_FOUND)
+ IF(LADSPA_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find LADSPA")
+ ENDIF(LADSPA_FIND_REQUIRED)
+ ENDIF(LADSPA_FOUND)
+ MARK_AS_ADVANCED(LADSPA_INCLUDE_DIR)
+ ##################################################################
+
IF(LADSPA_FOUND)
SET(HAVE_LADSPA TRUE)
ADD_DEFINITIONS(-DHAVE_LADSPA)
SET(LADSPA_INC_DIR ${LADSPA_INCLUDE_DIR})
- MESSAGE(STATUS "Found LADSPA (${LADSPA_INC_DIR})")
ENDIF(LADSPA_FOUND)
ENDIF(WANT_SOUND)