Statically link gverb

This commit is contained in:
Atlante45 2014-10-22 12:56:44 -07:00
parent e496304f7e
commit ccc8e0d876
4 changed files with 24 additions and 31 deletions

View file

@ -13,26 +13,27 @@
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
#
if (GVERB_INCLUDE_DIRS)
# in cache already
set(GVERB_FOUND TRUE)
else ()
find_path(GVERB_INCLUDE_DIRS gverb.h ${GVERB_ROOT_DIR}/include)
if (GVERB_INCLUDE_DIRS)
set(GVERB_FOUND TRUE)
endif (GVERB_INCLUDE_DIRS)
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
hifi_library_search_hints("gverb")
if (GVERB_FOUND)
if (NOT GVERB_FIND_QUIETLY)
message(STATUS "Found Gverb: ${GVERB_INCLUDE_DIRS}")
endif (NOT GVERB_FIND_QUIETLY)
else ()
if (GVERB_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find Gverb")
endif (GVERB_FIND_REQUIRED)
endif ()
find_path(GVERB_INCLUDE_DIRS gverb.h PATH_SUFFIXES include HINTS ${GVERB_SEARCH_DIRS})
find_path(GVERB_SRC_DIRS gverb.c PATH_SUFFIXES src HINTS ${GVERB_SEARCH_DIRS})
if (GVERB_INCLUDE_DIRS)
set(GVERB_FOUND TRUE)
endif (GVERB_INCLUDE_DIRS)
if (GVERB_FOUND)
message(STATUS "Found Gverb: ${GVERB_INCLUDE_DIRS}")
else ()
message(FATAL_ERROR "Could NOT find Gverb. Read ./interface/externals/gverb/readme.txt")
endif ()
endif ()

View file

@ -14,9 +14,17 @@ endforeach()
find_package(Qt5LinguistTools REQUIRED)
find_package(Qt5LinguistToolsMacros)
# As Gverb is currently the only reverb library, it's required.
find_package(Gverb REQUIRED)
if (GVERB_FOUND)
file(GLOB GVERB_SRCS ${GVERB_SRC_DIRS}/*.c)
include_directories(${GVERB_INCLUDE_DIRS})
add_library(Gverb ${GVERB_SRCS})
message(STATUS "Gverb srcs: ${GVERB_SRCS}")
endif (GVERB_FOUND)
if (DEFINED ENV{JOB_ID})
set(BUILD_SEQ $ENV{JOB_ID})
else ()
@ -169,12 +177,6 @@ if (QXMPP_FOUND AND NOT DISABLE_QXMPP AND WIN32)
add_definitions(-DQXMPP_STATIC)
endif ()
if (GVERB_FOUND)
add_subdirectory(${GVERB_ROOT_DIR})
include_directories(${GVERB_INCLUDE_DIRS})
target_link_libraries(${TARGET_NAME} gverb)
endif (GVERB_FOUND)
# include headers for interface and InterfaceConfig.
include_directories("${PROJECT_SOURCE_DIR}/src" "${PROJECT_BINARY_DIR}/includes")

View file

@ -1,11 +0,0 @@
cmake_minimum_required(VERSION 2.8)
set(TARGET_NAME gverb)
project(${TARGET_NAME})
# grab the implementation and header files
file(GLOB GVERB_SRCS src/*.c)
include_directories(include)
add_library(${TARGET_NAME} ${GVERB_SRCS})

View file

@ -49,6 +49,7 @@
extern "C" {
#include <gverb.h>
#include <gverbdsp.h>
}
static const int NUM_AUDIO_CHANNELS = 2;