From 28fdc4259dad961705d3581d3837bbdf066cacfb Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 28 Nov 2014 14:21:09 +0100 Subject: [PATCH] Fix build with CMake. --- CMakeLists.txt | 2 -- msbcg729/CMakeLists.txt | 4 +++- src/CMakeLists.txt | 6 ------ 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2792ab2..bbc913c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,6 @@ endif() list(APPEND CMAKE_MODULE_PATH ${CMAKE_PREFIX_PATH}/share/cmake/Modules) -message("CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}") include(CheckIncludeFile) check_include_file("dlfcn.h" HAVE_DLFCN_H) @@ -75,7 +74,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY include_directories( - ${MS2_INCLUDE_DIR} include src ${CMAKE_CURRENT_BINARY_DIR} diff --git a/msbcg729/CMakeLists.txt b/msbcg729/CMakeLists.txt index e09a669..2c63574 100644 --- a/msbcg729/CMakeLists.txt +++ b/msbcg729/CMakeLists.txt @@ -25,6 +25,8 @@ set(SOURCE_FILES bcg729_enc.c ) +include_directories(${MS2_INCLUDE_DIRS}) + add_library(msbcg729 SHARED ${BCG729_SOURCE_FILES} ${SOURCE_FILES}) set_target_properties(msbcg729 PROPERTIES VERSION ${PACKAGE_VERSION} SOVERSION 0) if(MSVC) @@ -36,7 +38,7 @@ if(MSVC) endif() set_target_properties(msbcg729 PROPERTIES PREFIX "lib") endif() -target_link_libraries(msbcg729 ${BCG729_LIBS}) +target_link_libraries(msbcg729 ${MS2_LIBRARIES} ${ORTP_LIBRARIES}) install(TARGETS msbcg729 RUNTIME DESTINATION lib/mediastreamer/plugins diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c9aca65..f274f92 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -20,11 +20,6 @@ # ############################################################################ -set(BCG729_LIBS - ${MS2_LIBRARIES} - ${ORTP_LIBRARIES} -) - set(BCG729_SOURCE_FILES adaptativeCodebookSearch.c codebooks.c @@ -62,7 +57,6 @@ if(MSVC) endif() set_target_properties(bcg729 PROPERTIES PREFIX "lib") endif() -target_link_libraries(bcg729 ${BCG729_LIBS}) install(TARGETS bcg729 RUNTIME DESTINATION bin