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

master
Paul Sutton 11 years ago
parent f41ca07e83
commit d10e4d809d

@ -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}) 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}) TARGET_LINK_LIBRARIES(graphics pthread ${QT_LIBRARIES} ${QWT_LIBRARIES})
INSTALL(TARGETS graphics DESTINATION ${LIBRARY_DIR}) INSTALL(TARGETS graphics DESTINATION ${LIBRARY_DIR})
LIBLTE_SET_PIC(graphics) LIBLTE_SET_PIC(graphics)

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

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

Loading…
Cancel
Save