mirror of https://github.com/lwvmobile/dsd-fme.git
Cleanup cmake find modules
This commit is contained in:
parent
5f8aedb864
commit
98f9e36291
|
|
@ -1,5 +1,5 @@
|
|||
project(dsd)
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/")
|
||||
|
||||
|
|
@ -7,30 +7,26 @@ include(git_revision)
|
|||
git_describe(GIT_TAG)
|
||||
|
||||
find_package(LibSndFile REQUIRED)
|
||||
find_package(LibMbe REQUIRED)
|
||||
find_package(MBE REQUIRED)
|
||||
find_package(ITPP REQUIRED)
|
||||
find_package(LibPortAudio)
|
||||
|
||||
include_directories(SYSTEM ${LIBSNDFILE_INCLUDE_DIR} ${MBE_INCLUDE_DIR} ${ITPP_INCLUDE_DIR})
|
||||
set(LIBS ${MBE_LIBRARY} ${LIBSNDFILE_LIBRARY} ${ITPP_LIBRARY})
|
||||
|
||||
if(PORTAUDIO_FOUND)
|
||||
include_directories(SYSTEM ${PORTAUDIO_INCLUDE_DIRS})
|
||||
list(APPEND LIBS ${PORTAUDIO_LIBRARIES})
|
||||
add_definitions(-DUSE_PORTAUDIO)
|
||||
endif(PORTAUDIO_FOUND)
|
||||
|
||||
FILE(GLOB SRCS src/*.c src/*.cpp)
|
||||
FILE(GLOB HEADERS include/*.h include/*.hpp)
|
||||
|
||||
configure_file("src/git_ver.c.in" "${CMAKE_CURRENT_BINARY_DIR}/git_ver.c" @ONLY)
|
||||
list(APPEND SRCS "${CMAKE_CURRENT_BINARY_DIR}/git_ver.c")
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
"${PROJECT_SOURCE_DIR}/include"
|
||||
"${LIBSNDFILE_INCLUDE_DIR}"
|
||||
"${LIBMBE_INCLUDE_DIR}"
|
||||
"${ITPP_INCLUDE_DIR}"
|
||||
)
|
||||
|
||||
SET(LIBS ${LIBS} ${LIBMBE_LIBRARY} ${LIBSNDFILE_LIBRARY} ${ITPP_LIBRARY})
|
||||
|
||||
if(PORTAUDIO_FOUND)
|
||||
SET(INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} "${PORTAUDIO_INCLUDE_DIRS}")
|
||||
SET(LIBS ${LIBS} ${PORTAUDIO_LIBRARIES})
|
||||
add_definitions(-DUSE_PORTAUDIO)
|
||||
endif(PORTAUDIO_FOUND)
|
||||
include_directories("${PROJECT_SOURCE_DIR}/include")
|
||||
|
||||
ADD_EXECUTABLE(dsd ${SRCS} ${HEADERS})
|
||||
TARGET_LINK_LIBRARIES(dsd ${LIBS})
|
||||
|
|
|
|||
|
|
@ -1,20 +1,15 @@
|
|||
# Find ITPP
|
||||
# - Try to find ITPP
|
||||
# Once done this will define
|
||||
#
|
||||
# ITPP_FOUND - System has ITPP
|
||||
# ITPP_INCLUDE_DIR - The ITPP include directory
|
||||
# ITPP_LIBRARY - The library needed to use ITPP
|
||||
#
|
||||
|
||||
FIND_PATH(ITPP_INCLUDE_DIR itpp/itcomm.h)
|
||||
find_path(ITPP_INCLUDE_DIR itpp/itcomm.h)
|
||||
|
||||
SET(ITPP_NAMES ${ITPP_NAMES} itpp libitpp libitpp.dll)
|
||||
FIND_LIBRARY(ITPP_LIBRARY NAMES ${ITPP_NAMES} PATH)
|
||||
set(ITPP_NAMES ${ITPP_NAMES} itpp libitpp libitpp.dll)
|
||||
FIND_LIBRARY(ITPP_LIBRARY NAMES ${ITPP_NAMES})
|
||||
|
||||
IF (ITPP_INCLUDE_DIR AND ITPP_LIBRARY)
|
||||
SET(ITPP_FOUND TRUE)
|
||||
ENDIF (ITPP_INCLUDE_DIR AND ITPP_LIBRARY)
|
||||
|
||||
IF (ITPP_FOUND)
|
||||
IF (NOT ITPP_FIND_QUIETLY)
|
||||
MESSAGE (STATUS "Found ITPP: ${ITPP_LIBRARY}")
|
||||
ENDIF (NOT ITPP_FIND_QUIETLY)
|
||||
ELSE (ITPP_FOUND_FOUND)
|
||||
IF (ITPP_FIND_REQUIRED)
|
||||
MESSAGE (FATAL_ERROR "Could not find ITPP")
|
||||
ENDIF (ITPP_FIND_REQUIRED)
|
||||
ENDIF (ITPP_FOUND)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ITPP DEFAULT_MSG ITPP_LIBRARY ITPP_INCLUDE_DIR)
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# Find libmbe
|
||||
|
||||
FIND_PATH(LIBMBE_INCLUDE_DIR mbelib.h)
|
||||
|
||||
SET(LIBMBE_NAMES ${LIBMBE_NAMES} mbe libmbe)
|
||||
FIND_LIBRARY(LIBMBE_LIBRARY NAMES ${LIBMBE_NAMES} PATH)
|
||||
|
||||
IF (LIBMBE_INCLUDE_DIR AND LIBMBE_LIBRARY)
|
||||
SET(LIBMBE_FOUND TRUE)
|
||||
ENDIF (LIBMBE_INCLUDE_DIR AND LIBMBE_LIBRARY)
|
||||
|
||||
IF (LIBMBE_FOUND)
|
||||
IF (NOT LibMbe_FIND_QUIETLY)
|
||||
MESSAGE (STATUS "Found LibMbe: ${LIBMBE_LIBRARY}")
|
||||
ENDIF (NOT LibMbe_FIND_QUIETLY)
|
||||
ELSE (LIBMBE_FOUND)
|
||||
IF (LibMbe_FIND_REQUIRED)
|
||||
MESSAGE (FATAL_ERROR "Could not find mbe")
|
||||
ENDIF (LibMbe_FIND_REQUIRED)
|
||||
ENDIF (LIBMBE_FOUND)
|
||||
|
|
@ -1,20 +1,16 @@
|
|||
# Find libsndfile
|
||||
# - Try to find Libsndfile
|
||||
# Once done this will define
|
||||
#
|
||||
# LIBSNDFILE_FOUND - System has LIBSNDFILE
|
||||
# LIBSNDFILE_INCLUDE_DIR - The SNDFILE include directory
|
||||
# LIBSNDFILE_LIBRARY - The library needed to use SNDFILE
|
||||
#
|
||||
|
||||
FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h)
|
||||
find_path(LIBSNDFILE_INCLUDE_DIR sndfile.h)
|
||||
|
||||
SET(LIBSNDFILE_NAMES ${LIBSNDFILE_NAMES} sndfile libsndfile)
|
||||
FIND_LIBRARY(LIBSNDFILE_LIBRARY NAMES ${LIBSNDFILE_NAMES} PATH)
|
||||
FIND_LIBRARY(LIBSNDFILE_LIBRARY NAMES ${LIBSNDFILE_NAMES})
|
||||
|
||||
IF (LIBSNDFILE_INCLUDE_DIR AND LIBSNDFILE_LIBRARY)
|
||||
SET(LIBSNDFILE_FOUND TRUE)
|
||||
ENDIF (LIBSNDFILE_INCLUDE_DIR AND LIBSNDFILE_LIBRARY)
|
||||
|
||||
IF (LIBSNDFILE_FOUND)
|
||||
IF (NOT LibSndFile_FIND_QUIETLY)
|
||||
MESSAGE (STATUS "Found LibSndFile: ${LIBSNDFILE_LIBRARY}")
|
||||
ENDIF (NOT LibSndFile_FIND_QUIETLY)
|
||||
ELSE (LIBSNDFILE_FOUND)
|
||||
IF (LibSndFile_FIND_REQUIRED)
|
||||
MESSAGE (FATAL_ERROR "Could not find sndfile")
|
||||
ENDIF (LibSndFile_FIND_REQUIRED)
|
||||
ENDIF (LIBSNDFILE_FOUND)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBSNDFILE DEFAULT_MSG LIBSNDFILE_LIBRARY
|
||||
LIBSNDFILE_INCLUDE_DIR)
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# - Try to find MBE
|
||||
# Once done this will define
|
||||
#
|
||||
# MBE_FOUND - System has MBE
|
||||
# MBE_INCLUDE_DIR - The MBE include directory
|
||||
# MBE_LIBRARY - The library needed to use MBE
|
||||
#
|
||||
|
||||
find_path(MBE_INCLUDE_DIR mbelib.h)
|
||||
|
||||
set(MBE_NAMES ${MBE_NAMES} mbe libmbe)
|
||||
find_library(MBE_LIBRARY NAMES ${MBE_NAMES})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(MBE DEFAULT_MSG MBE_LIBRARY MBE_INCLUDE_DIR)
|
||||
Loading…
Reference in New Issue