diff --git a/cmake/modules/FindGverb.cmake b/cmake/modules/FindGverb.cmake index f71e1256a2..175c216359 100644 --- a/cmake/modules/FindGverb.cmake +++ b/cmake/modules/FindGverb.cmake @@ -32,8 +32,7 @@ endif (GVERB_INCLUDE_DIRS) if (GVERB_FOUND) message(STATUS "Found Gverb: ${GVERB_INCLUDE_DIRS}") -else () +else (GVERB_FOUND) message(FATAL_ERROR "Could NOT find Gverb. Read ./interface/externals/gverb/readme.txt") -endif () +endif (GVERB_FOUND) -endif () diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index d0868aebcd..a150a308e0 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -18,13 +18,6 @@ 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 () @@ -177,6 +170,13 @@ if (QXMPP_FOUND AND NOT DISABLE_QXMPP AND WIN32) add_definitions(-DQXMPP_STATIC) endif () +if (GVERB_FOUND) + file(GLOB GVERB_SRCS ${GVERB_SRC_DIRS}/*.c) + include_directories(${GVERB_INCLUDE_DIRS}) + add_library(gverb STATIC ${GVERB_SRCS}) + 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")