Skip to content

Commit

Permalink
Build on fedora -- working
Browse files Browse the repository at this point in the history
  • Loading branch information
James Smith committed Apr 10, 2014
1 parent 8f29fa7 commit d875bbf
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 10 deletions.
2 changes: 1 addition & 1 deletion preferences/Preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <QFont>
#include <QPalette>
#include <QtGlobal>
#include <yaml-cpp/yaml.h>
#include <yaml.h>
#include <fstream>

// TODO: implement versioning for preference files
Expand Down
2 changes: 1 addition & 1 deletion preferences/TextColor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "session/SessionCommon.h"
#include <QApplication>
#include <QColor>
#include <yaml-cpp/yaml.h>
#include <yaml.h>

const std::string FOREGROUND_KEY = "foreground";
const std::string BACKGROUND_KEY = "background";
Expand Down
2 changes: 1 addition & 1 deletion session/AppSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "FileSession.h"
#include "SearchSession.h"
#include "SessionCommon.h"
#include <yaml-cpp/yaml.h>
#include <yaml.h>
#include <fstream>

const std::string AppSession::GEOMETRY_KEY = "geometry";
Expand Down
2 changes: 1 addition & 1 deletion session/FileSession.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "FileSession.h"
#include "SessionCommon.h"
#include <yaml-cpp/yaml.h>
#include <yaml.h>

const std::string FileSession::PATH_KEY = "path";
const std::string FileSession::ADDRESS_KEY = "address";
Expand Down
2 changes: 1 addition & 1 deletion session/SearchSession.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "SearchSession.h"
#include "SessionCommon.h"
#include <yaml-cpp/yaml.h>
#include <yaml.h>


const std::string SearchSession::EXPRESSION_KEY = "expression";
Expand Down
2 changes: 1 addition & 1 deletion session/SessionCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

// TODO: move this to a yaml subdirectory, since it's being used by preferences serialization, not just session.

#include <yaml-cpp/yaml.h>
#include <yaml.h>
#include <string>

template <typename T> T getValue(const YAML::Node & in, const std::string & key)
Expand Down
31 changes: 27 additions & 4 deletions yata.pro
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ SOURCES += \
RESOURCES += \
resource/resources.qrc

#QT += widgets

win32 {
isEmpty(YAMLCPP): YAMLCPP = $$PWD/../yaml-cpp
INCLUDEPATH += $$YAMLCPP/include
Expand All @@ -120,12 +118,37 @@ win32 {
/DVERSION=$$VERSION $$PWD\\win\\installer.nsi
INSTALLS += target
}
LIBS += -lyaml-cpp
}

defineReplace(findFile) {
baseDirs=$$1
components=$$2
for(baseDir, baseDirs) {
for(component, components) {
path=$$baseDir/$$component
exists($$path) {
return($$path)
}
}
}
}

unix {
isEmpty(YAMLCPPINC) {

includeDirs=/usr/local/include /usr/include
prospectives=yaml-cpp03 yaml-cpp

YAMLCPPINC=$$findFile($$includeDirs, $$prospectives)

isEmpty(YAMLCPPINC): error(Could not find yaml-cpp include path)
}
message(YAMLCPPINC: $$YAMLCPPINC)
INCLUDEPATH += $$YAMLCPPINC
isEmpty(INSTALLDIR): INSTALLDIR = /usr/local/bin
target.path = $$INSTALLDIR
INSTALLS += target
}

LIBS += -lyaml-cpp
LIBS += -l:libyaml-cpp.so.0.3
}

0 comments on commit d875bbf

Please sign in to comment.