Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 20889200C36 for ; Thu, 23 Feb 2017 16:22:21 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1F623160B50; Thu, 23 Feb 2017 15:22:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 40BE1160B62 for ; Thu, 23 Feb 2017 16:22:20 +0100 (CET) Received: (qmail 31219 invoked by uid 500); 23 Feb 2017 15:22:19 -0000 Mailing-List: contact commits-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list commits@geode.apache.org Received: (qmail 31208 invoked by uid 99); 23 Feb 2017 15:22:19 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2017 15:22:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3BFE0DFD9E; Thu, 23 Feb 2017 15:22:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jbarrett@apache.org To: commits@geode.apache.org Date: Thu, 23 Feb 2017 15:22:19 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] geode-native git commit: GEODE-2508: Initial work on new approach to generic lib naming. archived-at: Thu, 23 Feb 2017 15:22:21 -0000 Repository: geode-native Updated Branches: refs/heads/develop 97ded7036 -> c45b7895d GEODE-2508: Initial work on new approach to generic lib naming. Project: http://git-wip-us.apache.org/repos/asf/geode-native/repo Commit: http://git-wip-us.apache.org/repos/asf/geode-native/commit/90f7514a Tree: http://git-wip-us.apache.org/repos/asf/geode-native/tree/90f7514a Diff: http://git-wip-us.apache.org/repos/asf/geode-native/diff/90f7514a Branch: refs/heads/develop Commit: 90f7514a43b81b63d20f6dbccdfa00978037aa9c Parents: 97ded70 Author: Ernest Burghardt Authored: Wed Feb 22 08:52:13 2017 -0800 Committer: Jacob Barrett Committed: Thu Feb 23 07:14:30 2017 -0800 ---------------------------------------------------------------------- src/CMakeLists.txt | 3 +++ src/clicache/src/Apache.Geode.rc | 4 ++-- src/cppcache/src/CMakeLists.txt | 2 +- src/cppcache/src/CppCacheLibrary.cpp | 17 ++++++++++------- src/cppcache/src/apache-geode.rc | 4 ++-- src/cppcache/src/config.h.in | 2 ++ 6 files changed, 20 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode-native/blob/90f7514a/src/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e7de471..9916593 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,6 +27,9 @@ set(PRODUCT_PACKAGE_NAME "apache-geode-native" CACHE STRING "Product package nam set(PRODUCT_BITS "${BUILD_BITS}bit") +set(PRODUCT_LIB_NAME "apache-geode" CACHE STRING "Binary name") +set(PRODUCT_DLL_NAME "Apache.Geode" CACHE STRING ".Net Binary name") + if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") if (CMAKE_SYSTEM_PROCESSOR STREQUAL "sparc") set(PRODUCT_SYSTEM_NAME "solaris-sparc") http://git-wip-us.apache.org/repos/asf/geode-native/blob/90f7514a/src/clicache/src/Apache.Geode.rc ---------------------------------------------------------------------- diff --git a/src/clicache/src/Apache.Geode.rc b/src/clicache/src/Apache.Geode.rc index 48f1af2..a23e7a9 100644 --- a/src/clicache/src/Apache.Geode.rc +++ b/src/clicache/src/Apache.Geode.rc @@ -34,9 +34,9 @@ BEGIN VALUE "CompanyName", PRODUCT_VENDOR_NAME VALUE "FileDescription", PRODUCT_NAME " .NET Library" VALUE "FileVersion", PRODUCT_VERSION - VALUE "InternalName", "Apache.Geode" + VALUE "InternalName", PRODUCT_DLL_NAME VALUE "LegalCopyright", "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership." - VALUE "OriginalFilename", "Apache.Geode.dll" + VALUE "OriginalFilename", PRODUCT_DLL_NAME".dll" VALUE "ProductName", PRODUCT_NAME VALUE "ProductVersion", PRODUCT_VERSION END http://git-wip-us.apache.org/repos/asf/geode-native/blob/90f7514a/src/cppcache/src/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/src/cppcache/src/CMakeLists.txt b/src/cppcache/src/CMakeLists.txt index 4cd4a11..5095f4d 100644 --- a/src/cppcache/src/CMakeLists.txt +++ b/src/cppcache/src/CMakeLists.txt @@ -125,7 +125,7 @@ target_include_directories(apache-geode $ ) add_dependencies(client-libraries apache-geode) -set_target_properties(apache-geode PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") +set_target_properties(apache-geode PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}" OUTPUT_NAME ${PRODUCT_LIB_NAME} ) add_library(apache-geode-static STATIC ${SOURCES_ALL}) target_link_libraries(apache-geode-static http://git-wip-us.apache.org/repos/asf/geode-native/blob/90f7514a/src/cppcache/src/CppCacheLibrary.cpp ---------------------------------------------------------------------- diff --git a/src/cppcache/src/CppCacheLibrary.cpp b/src/cppcache/src/CppCacheLibrary.cpp index 75ba86a..4764d74 100644 --- a/src/cppcache/src/CppCacheLibrary.cpp +++ b/src/cppcache/src/CppCacheLibrary.cpp @@ -23,7 +23,7 @@ #include #include -//#include +#include "config.h" #include "MapEntry.hpp" #include "ExpMapEntry.hpp" #include "LRUMapEntry.hpp" @@ -127,15 +127,18 @@ std::string CppCacheLibrary::getProductLibDir() { for (int i = 0; i < PATH_MAX && path[i] != 0; i++) { path[i] = ::tolower(path[i]); } - dllNamePtr = strstr(path, "apache-geode.dll"); + std::string cppName = PRODUCT_LIB_NAME; + cppName += ".dll"; + std::string dotNetName = PRODUCT_DLL_NAME; + dotNetName += ".dll"; + dllNamePtr = strstr(path, cppName.c_str()); if (dllNamePtr == NULL) { - dllNamePtr = strstr(path, "apache-geode_g.dll"); - if (dllNamePtr == NULL) { - dllNamePtr = strstr(path, "Apache.Geode.dll"); - } + dllNamePtr = strstr(path, dotNetName.c_str()); } #else - dllNamePtr = strstr(path, "libapache-geode"); + std::string cppName = "lib"; + cppName += PRODUCT_LIB_NAME; + dllNamePtr = strstr(path, cppName.c_str()); #endif std::string libDir; if (dllNamePtr != NULL) { http://git-wip-us.apache.org/repos/asf/geode-native/blob/90f7514a/src/cppcache/src/apache-geode.rc ---------------------------------------------------------------------- diff --git a/src/cppcache/src/apache-geode.rc b/src/cppcache/src/apache-geode.rc index cc5130e..04b7d71 100644 --- a/src/cppcache/src/apache-geode.rc +++ b/src/cppcache/src/apache-geode.rc @@ -34,9 +34,9 @@ BEGIN VALUE "CompanyName", PRODUCT_VENDOR_NAME VALUE "FileDescription", PRODUCT_NAME " C++ Library" VALUE "FileVersion", PRODUCT_VERSION - VALUE "InternalName", "apache-geode" + VALUE "InternalName", PRODUCT_LIB_NAME VALUE "LegalCopyright", "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership." - VALUE "OriginalFilename", "apache-geode.dll" + VALUE "OriginalFilename", PRODUCT_LIB_NAME".dll" VALUE "ProductName", PRODUCT_NAME VALUE "ProductVersion", PRODUCT_VERSION END http://git-wip-us.apache.org/repos/asf/geode-native/blob/90f7514a/src/cppcache/src/config.h.in ---------------------------------------------------------------------- diff --git a/src/cppcache/src/config.h.in b/src/cppcache/src/config.h.in index 59b036c..f8b5308 100644 --- a/src/cppcache/src/config.h.in +++ b/src/cppcache/src/config.h.in @@ -30,6 +30,8 @@ #define PRODUCT_VENDOR_NAME "@PRODUCT_VENDOR_NAME@" #define PRODUCT_NAME "@PRODUCT_NAME@" #define PRODUCT_BITS "@PRODUCT_BITS@" +#define PRODUCT_LIB_NAME "@PRODUCT_LIB_NAME@" +#define PRODUCT_DLL_NAME "@PRODUCT_DLL_NAME@" // TODO relace with CMake checks #define WITH_ACE_Select_Reactor 1