Building as shared libraries, adding extern C calls to support use from C++

This commit is contained in:
Paul Sutton 2014-05-19 16:45:08 +01:00
parent f41ca07e83
commit d10e4d809d
3 changed files with 10 additions and 2 deletions

View file

@ -67,7 +67,7 @@ IF(QT4_FOUND AND QWT_FOUND AND QWT_MAJOR_VERSION EQUAL 6)
INCLUDE_DIRECTORIES(common complexplot realplot scatterplot waterfallplot ${Boost_INCLUDE_DIRS})
ADD_LIBRARY(graphics ${eventwraps} ${lineplotwraps} ${pointplotwraps} ${spectrogramplotwraps} ${complex} ${real} ${scatter} ${waterfall} ${SOURCES_ALL} )
ADD_LIBRARY(graphics SHARED ${eventwraps} ${lineplotwraps} ${pointplotwraps} ${spectrogramplotwraps} ${complex} ${real} ${scatter} ${waterfall} ${SOURCES_ALL} )
TARGET_LINK_LIBRARIES(graphics pthread ${QT_LIBRARIES} ${QWT_LIBRARIES})
INSTALL(TARGETS graphics DESTINATION ${LIBRARY_DIR})
LIBLTE_SET_PIC(graphics)

View file

@ -32,6 +32,10 @@
#ifndef _LTE_
#define _LTE_
#ifdef __cplusplus
extern "C" {
#endif
#include "lte/utils/bit.h"
#include "lte/utils/convolution.h"
#include "lte/utils/debug.h"
@ -90,4 +94,8 @@
#include "lte/sync/sync.h"
#include "lte/sync/cfo.h"
#ifdef __cplusplus
}
#endif
#endif

View file

@ -51,7 +51,7 @@ FOREACH (_module ${modules})
ENDIF(IS_DIRECTORY ${_module})
ENDFOREACH()
ADD_LIBRARY(lte ${SOURCES_ALL})
ADD_LIBRARY(lte SHARED ${SOURCES_ALL})
TARGET_LINK_LIBRARIES(lte m ${FFTW3F_LIBRARIES})
INSTALL(TARGETS lte DESTINATION ${LIBRARY_DIR})
LIBLTE_SET_PIC(lte)