Commit 781e209a authored by jehan's avatar jehan

fix cmake build

parent a9418408
......@@ -85,7 +85,7 @@ add_subdirectory(src)
if(ENABLE_MSPLUGIN)
add_subdirectory(msbcg729)
endif()
if(ENABLE_TESTS)
if(ENABLE_TESTS AND NOT ENABLE_MSPLUGIN)
add_subdirectory(test)
endif()
......
......@@ -19,86 +19,92 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
if(NOT ENABLE_MSPLUGIN)
set(BCG729_LIBRARY bcg729)
else()
set(BCG729_LIBRARY msbcg729)
endif()
set(UTIL_SRC src/testUtils.c src/testUtils.h)
add_executable(adaptativeCodebookSearchTest src/adaptativeCodebookSearchTest.c ${UTIL_SRC})
target_link_libraries(adaptativeCodebookSearchTest bcg729)
target_link_libraries(adaptativeCodebookSearchTest ${BCG729_LIBRARY})
add_executable(computeAdaptativeCodebookGainTest src/computeAdaptativeCodebookGainTest.c ${UTIL_SRC})
target_link_libraries(computeAdaptativeCodebookGainTest bcg729)
target_link_libraries(computeAdaptativeCodebookGainTest ${BCG729_LIBRARY})
add_executable(computeLPTest src/computeLPTest.c ${UTIL_SRC})
target_link_libraries(computeLPTest bcg729)
target_link_libraries(computeLPTest ${BCG729_LIBRARY})
add_executable(computeWeightedSpeechTest src/computeWeightedSpeechTest.c ${UTIL_SRC})
target_link_libraries(computeWeightedSpeechTest bcg729)
target_link_libraries(computeWeightedSpeechTest ${BCG729_LIBRARY})
add_executable(decodeAdaptativeCodeVectorTest src/decodeAdaptativeCodeVectorTest.c ${UTIL_SRC})
target_link_libraries(decodeAdaptativeCodeVectorTest bcg729)
target_link_libraries(decodeAdaptativeCodeVectorTest ${BCG729_LIBRARY})
add_executable(decodeFixedCodeVectorTest src/decodeFixedCodeVectorTest.c ${UTIL_SRC})
target_link_libraries(decodeFixedCodeVectorTest bcg729)
target_link_libraries(decodeFixedCodeVectorTest ${BCG729_LIBRARY})
add_executable(decodeGainsTest src/decodeGainsTest.c ${UTIL_SRC})
target_link_libraries(decodeGainsTest bcg729)
target_link_libraries(decodeGainsTest ${BCG729_LIBRARY})
add_executable(decodeLSPTest src/decodeLSPTest.c ${UTIL_SRC})
target_link_libraries(decodeLSPTest bcg729)
target_link_libraries(decodeLSPTest ${BCG729_LIBRARY})
add_executable(decoderTest src/decoderTest.c ${UTIL_SRC})
target_link_libraries(decoderTest bcg729)
target_link_libraries(decoderTest ${BCG729_LIBRARY})
add_executable(CNGRFC3389decoderTest src/CNGRFC3389decoderTest.c ${UTIL_SRC})
target_link_libraries(CNGRFC3389decoderTest bcg729)
target_link_libraries(CNGRFC3389decoderTest ${BCG729_LIBRARY})
add_executable(CNGdecoderTest src/CNGdecoderTest.c ${UTIL_SRC})
target_link_libraries(CNGdecoderTest bcg729)
target_link_libraries(CNGdecoderTest ${BCG729_LIBRARY})
add_executable(decoderMultiChannelTest src/decoderMultiChannelTest.c ${UTIL_SRC})
target_link_libraries(decoderMultiChannelTest bcg729)
target_link_libraries(decoderMultiChannelTest ${BCG729_LIBRARY})
add_executable(encoderTest src/encoderTest.c ${UTIL_SRC})
target_link_libraries(encoderTest bcg729)
target_link_libraries(encoderTest ${BCG729_LIBRARY})
add_executable(encoderMultiChannelTest src/encoderMultiChannelTest.c ${UTIL_SRC})
target_link_libraries(encoderMultiChannelTest bcg729)
target_link_libraries(encoderMultiChannelTest ${BCG729_LIBRARY})
add_executable(findOpenLoopPitchDelayTest src/findOpenLoopPitchDelayTest.c ${UTIL_SRC})
target_link_libraries(findOpenLoopPitchDelayTest bcg729)
target_link_libraries(findOpenLoopPitchDelayTest ${BCG729_LIBRARY})
add_executable(fixedCodebookSearchTest src/fixedCodebookSearchTest.c ${UTIL_SRC})
target_link_libraries(fixedCodebookSearchTest bcg729)
target_link_libraries(fixedCodebookSearchTest ${BCG729_LIBRARY})
add_executable(g729FixedPointMathTest src/g729FixedPointMathTest.c ${UTIL_SRC})
target_link_libraries(g729FixedPointMathTest bcg729 m)
target_link_libraries(g729FixedPointMathTest ${BCG729_LIBRARY} m)
add_executable(gainQuantizationTest src/gainQuantizationTest.c ${UTIL_SRC})
target_link_libraries(gainQuantizationTest bcg729)
target_link_libraries(gainQuantizationTest ${BCG729_LIBRARY})
add_executable(interpolateqLSPAndConvert2LPTest src/interpolateqLSPAndConvert2LPTest.c ${UTIL_SRC})
target_link_libraries(interpolateqLSPAndConvert2LPTest bcg729)
target_link_libraries(interpolateqLSPAndConvert2LPTest ${BCG729_LIBRARY})
add_executable(LP2LSPConversionTest src/LP2LSPConversionTest.c ${UTIL_SRC})
target_link_libraries(LP2LSPConversionTest bcg729)
target_link_libraries(LP2LSPConversionTest ${BCG729_LIBRARY})
add_executable(LPSynthesisFilterTest src/LPSynthesisFilterTest.c ${UTIL_SRC})
target_link_libraries(LPSynthesisFilterTest bcg729)
target_link_libraries(LPSynthesisFilterTest ${BCG729_LIBRARY})
add_executable(LSPQuantizationTest src/LSPQuantizationTest.c ${UTIL_SRC})
target_link_libraries(LSPQuantizationTest bcg729)
target_link_libraries(LSPQuantizationTest ${BCG729_LIBRARY})
add_executable(postFilterTest src/postFilterTest.c ${UTIL_SRC})
target_link_libraries(postFilterTest bcg729)
target_link_libraries(postFilterTest ${BCG729_LIBRARY})
add_executable(postProcessingTest src/postProcessingTest.c ${UTIL_SRC})
target_link_libraries(postProcessingTest bcg729)
target_link_libraries(postProcessingTest ${BCG729_LIBRARY})
add_executable(preProcessingTest src/preProcessingTest.c ${UTIL_SRC})
target_link_libraries(preProcessingTest bcg729)
target_link_libraries(preProcessingTest ${BCG729_LIBRARY})
add_executable(computeNoiseExcitationTest src/computeNoiseExcitationTest.c ${UTIL_SRC})
target_link_libraries(computeNoiseExcitationTest bcg729)
target_link_libraries(computeNoiseExcitationTest ${BCG729_LIBRARY})
add_executable(encoderVADTest src/encoderVADTest.c ${UTIL_SRC})
target_link_libraries(encoderVADTest bcg729)
target_link_libraries(encoderVADTest ${BCG729_LIBRARY})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment