Building JSONCPP inside Find-Object (easiest integration for Windows)
git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@390 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
+1
-12
@@ -58,6 +58,7 @@ SET(SRC_FILES
|
||||
./utilite/UFile.cpp
|
||||
./utilite/UConversion.cpp
|
||||
./rtabmap/PdfPlot.cpp
|
||||
./json/jsoncpp.cpp
|
||||
${moc_srcs}
|
||||
${moc_uis}
|
||||
${srcs_qrc}
|
||||
@@ -77,18 +78,6 @@ SET(LIBRARIES
|
||||
${OpenCV_LIBS}
|
||||
)
|
||||
|
||||
IF(JSONCPP_FOUND)
|
||||
SET(INCLUDE_DIRS
|
||||
${INCLUDE_DIRS}
|
||||
${JSONCPP_INCLUDE_DIRS}
|
||||
)
|
||||
SET(LIBRARIES
|
||||
${LIBRARIES}
|
||||
${JSONCPP_LIBRARIES}
|
||||
)
|
||||
ADD_DEFINITIONS("-DWITH_JSONCPP")
|
||||
ENDIF(JSONCPP_FOUND)
|
||||
|
||||
#include files
|
||||
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
|
||||
|
||||
|
||||
+1
-16
@@ -31,24 +31,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QTextStream>
|
||||
|
||||
#ifdef WITH_JSONCPP
|
||||
#include <json/writer.h>
|
||||
#endif
|
||||
#include "json/json.h"
|
||||
|
||||
namespace find_object {
|
||||
|
||||
bool JsonWriter::available()
|
||||
{
|
||||
#ifdef WITH_JSONCPP
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void JsonWriter::write(const DetectionInfo & info, const QString & path)
|
||||
{
|
||||
#ifdef WITH_JSONCPP
|
||||
if(!path.isEmpty())
|
||||
{
|
||||
Json::Value root;
|
||||
@@ -121,9 +109,6 @@ void JsonWriter::write(const DetectionInfo & info, const QString & path)
|
||||
out << styledWriter.write(root).c_str();
|
||||
file.close();
|
||||
}
|
||||
#else
|
||||
UERROR("Not built with JSON support!");
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace find_object
|
||||
|
||||
Reference in New Issue
Block a user