geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [1/2] geode-native git commit: GEODE-2508: Initial work on new approach to generic lib naming.
Date Thu, 23 Feb 2017 15:22:19 GMT
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 <eburghardt@pivotal.io>
Authored: Wed Feb 22 08:52:13 2017 -0800
Committer: Jacob Barrett <jbarrett@pivotal.io>
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
     $<TARGET_PROPERTY:_apache-geode,INTERFACE_INCLUDE_DIRECTORIES>
 )
 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 <ace/Log_Msg.h>
 #include <ace/Singleton.h>
 
-//#include <StatisticsFactory.hpp>
+#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


Mime
View raw message