Hello
in attachment is updated patch, without copyright notice
2011/10/24 Mateusz Łoskot <[email protected]>:
> On 24 October 2011 12:15, Alex Ott <[email protected]> wrote:
>> Hello all
>>
>> I implemented small patch for SOCI that allows to use default install
>> location when backend loader looks for shared objects. Patch is
>> attached, I made it against 3.1.0
>
> Alex,
>
> The patch adds new file which consists of the following comment:
>
> * Proprietary software, Copyright (C) 2011 McAfee, Inc.
> * All rights reserved. No part hereof may be used or reproduced in any form
> * without written permission by the owner. Any violation is a
> punishable crime.
>
> Is this intentional? :-)
> If it is, I'm not sure I can submit it as it is.
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
> Charter Member of OSGeo, http://osgeo.org
> Member of ACCU, http://accu.org
>
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________
> Soci-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/soci-users
>
--
With best wishes, Alex Ott
http://alexott.net/
Tiwtter: alexott_en (English), alexott (Russian)
Skype: alex.ott
From 394a191f430260f3c1706f122e28e9cbb5fc23d6 Mon Sep 17 00:00:00 2001
From: Alex Ott <[email protected]>
Date: Mon, 24 Oct 2011 13:10:09 +0200
Subject: [PATCH] allow to load backends from install prefix/lib
---
core/CMakeLists.txt | 6 ++++++
core/backend-loader.cpp | 4 ++++
core/soci_backends_config.h.in | 12 ++++++++++++
3 files changed, 22 insertions(+), 0 deletions(-)
create mode 100644 core/soci_backends_config.h.in
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index f268ec1..a5d66e9 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -71,6 +71,12 @@ set(SOCI_CORE_TARGET ${PROJECTNAMEL}_core)
soci_target_output_name(${SOCI_CORE_TARGET} SOCI_CORE_TARGET_OUTPUT_NAME)
+#
+set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR})
+set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR})
+
+CONFIGURE_FILE(soci_backends_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/soci_backends_config.h)
+
#
# Core shared library
#
diff --git a/core/backend-loader.cpp b/core/backend-loader.cpp
index 10bef3d..feaa977 100644
--- a/core/backend-loader.cpp
+++ b/core/backend-loader.cpp
@@ -17,6 +17,8 @@
#include <stdint.h>
#endif
+#include "soci_backends_config.h"
+
using namespace soci;
using namespace soci::dynamic_backends;
@@ -102,6 +104,7 @@ std::vector<std::string> get_default_paths()
if (0 == penv)
{
paths.push_back(".");
+ paths.push_back(DEFAULT_BACKENDS_PATH);
return paths;
}
@@ -109,6 +112,7 @@ std::vector<std::string> get_default_paths()
if (env.empty())
{
paths.push_back(".");
+ paths.push_back(DEFAULT_BACKENDS_PATH);
return paths;
}
diff --git a/core/soci_backends_config.h.in b/core/soci_backends_config.h.in
new file mode 100644
index 0000000..3db2f59
--- /dev/null
+++ b/core/soci_backends_config.h.in
@@ -0,0 +1,12 @@
+/* -*- mode: c++; tab-width: 4; c-basic-offset:4; indent-tabs-mode: t -*- */
+/* @doc
+ * @module <soci_backends_config.h> | <Brief description>
+ *
+ */
+
+#ifndef SOCI_BACKENDS_CONFIG_H
+#define SOCI_BACKENDS_CONFIG_H
+
+#define DEFAULT_BACKENDS_PATH "@CMAKE_INSTALL_PREFIX@@LIBDIR@"
+
+#endif /* SOCI_BACKENDS_CONFIG_H */
--
1.7.5.4
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users