Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
[pkgconfig] backward compatibility with old qtaround
Browse files Browse the repository at this point in the history
There was no qtaround namespace

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
  • Loading branch information
Denis Zalevskiy committed Oct 24, 2014
1 parent 26a1d30 commit 022b7ac
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Expand Up @@ -60,9 +60,12 @@ add_subdirectory(src)
add_subdirectory(tests)

configure_file(qtaround.pc.in qtaround.pc @ONLY)
configure_file(qtaround-1.pc.in qtaround-1.pc @ONLY)
configure_file(qtaround-dbus.pc.in qtaround-dbus.pc @ONLY)

install(FILES
${CMAKE_CURRENT_BINARY_DIR}/qtaround.pc
${CMAKE_CURRENT_BINARY_DIR}/qtaround-1.pc
${CMAKE_CURRENT_BINARY_DIR}/qtaround-dbus.pc
DESTINATION
${DST_LIB}/pkgconfig
Expand Down
4 changes: 4 additions & 0 deletions include/qtaround/debug.hpp
Expand Up @@ -87,4 +87,8 @@ void critical(A&& ...args)

}}

#ifdef QTAROUND_NO_NS
namespace debug = qtaround::debug;
#endif

#endif // _CUTES_DEBUG_HPP_
4 changes: 4 additions & 0 deletions include/qtaround/error.hpp
Expand Up @@ -57,4 +57,8 @@ void raise(T const &m1, T2 const &m2, A && ...args)

}}

#ifdef QTAROUND_NO_NS
namespace error = qtaround::error;
#endif

#endif // _CUTES_ERROR_HPP_
4 changes: 4 additions & 0 deletions include/qtaround/json.hpp
Expand Up @@ -22,6 +22,10 @@ ssize_t write(QVariantMap const &, QString const &);

}}

#ifdef QTAROUND_NO_NS
namespace json = qtaround::json;
#endif

namespace {

QVariant get(QJsonValue const &v)
Expand Down
4 changes: 4 additions & 0 deletions include/qtaround/os.hpp
Expand Up @@ -272,4 +272,8 @@ LockFileHandle tryLock(QString const &fileName, OnLocked fn)

}}

#ifdef QTAROUND_NO_NS
namespace os = qtaround::os;
#endif

#endif // _CUTES_OS_HPP_
4 changes: 4 additions & 0 deletions include/qtaround/subprocess.hpp
Expand Up @@ -114,4 +114,8 @@ static inline int check_call(QString const &cmd, QStringList const &args)

}}

#ifdef QTAROUND_NO_NS
namespace subprocess = qtaround::subprocess;
#endif

#endif // _CUTES_SUBPROCESS_HPP_
4 changes: 4 additions & 0 deletions include/qtaround/sys.hpp
Expand Up @@ -33,4 +33,8 @@ std::unique_ptr<GetOpt> getopt(QVariantMap const &, bool requireAll = true);

}}

#ifdef QTAROUND_NO_NS
namespace sys = qtaround::sys;
#endif

#endif // _CUTES_SYS_HPP_
4 changes: 4 additions & 0 deletions include/qtaround/util.hpp
Expand Up @@ -360,4 +360,8 @@ UNIQUE_PTR(T) qobject_box(T &&v)
return p;
}

#ifdef QTAROUND_NO_NS
namespace util = qtaround::util;
#endif

#endif // _CUTES_UTIL_HPP_
9 changes: 9 additions & 0 deletions qtaround-1.pc.in
@@ -0,0 +1,9 @@
prefix=@CMAKE_INSTALL_PREFIX@
libdir=${prefix}/@DST_LIB@
includedir=${prefix}/include

Name: qtaround
Description: qtaround library
Version: @VERSION@
Libs: -lqtaround -L${libdir}
Cflags: -I${includedir}
2 changes: 1 addition & 1 deletion qtaround.pc.in
Expand Up @@ -6,4 +6,4 @@ Name: qtaround
Description: qtaround library
Version: @VERSION@
Libs: -lqtaround -L${libdir}
Cflags: -I${includedir}
Cflags: -I${includedir} -DQTAROUND_NO_NS
1 change: 1 addition & 0 deletions rpm/qtaround.spec
Expand Up @@ -72,6 +72,7 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/qtaround.pc
%{_libdir}/pkgconfig/qtaround-1.pc
%{_includedir}/qtaround/debug.hpp
%{_includedir}/qtaround/error.hpp
%{_includedir}/qtaround/json.hpp
Expand Down

0 comments on commit 022b7ac

Please sign in to comment.