This is an automated email from the ASF dual-hosted git repository.

echobravo pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git

commit be518d004427b490edbd9bc39cee1be930882d5b
Author: Blake Bender <bben...@pivotal.io>
AuthorDate: Wed Feb 21 16:27:44 2018 +0000

    WIP: cmake code to allow us to generate projects and build C# examples.
---
 .../Apache.Geode.Examples.PutGetRemove/CMakeLists.txt    |  4 ++--
 examples/dotnet/CMakeLists.txt                           |  2 ++
 examples/dotnet/cmake/FindGeodeAssembly.cmake            | 16 ++++++++++++++++
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt 
b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt
index 620fa21..ab638b8 100644
--- a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt
+++ b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt
@@ -27,9 +27,9 @@ message(STATUS "current source dir is 
${CMAKE_CURRENT_SOURCE_DIR}")
 message(STATUS "Attempting to link to 
${CMAKE_CURRENT_SOURCE_DIR}/../../../build/clicache/src/Debug/Apache.Geode.dll")
 
 target_link_libraries(${PROJECT_NAME}
-    
${CMAKE_CURRENT_SOURCE_DIR}/../../../build/clicache/src/Debug/Apache.Geode.dll)
+       ${GEODE_ASSEMBLY})
 
 set_property(TARGET PutGetRemove PROPERTY VS_DOTNET_REFERENCES
     "System"
-    
"${CMAKE_CURRENT_SOURCE_DIR}\\..\\..\\..\\build\\clicache\\src\\Debug\\Apache.Geode.dll")
+    "${GEODE_ASSEMBLY}")
     
diff --git a/examples/dotnet/CMakeLists.txt b/examples/dotnet/CMakeLists.txt
index dda8923..96223d1 100644
--- a/examples/dotnet/CMakeLists.txt
+++ b/examples/dotnet/CMakeLists.txt
@@ -15,4 +15,6 @@
 cmake_minimum_required(VERSION 3.4)
 project(examples)
 
+include(cmake/FindGeodeAssembly.cmake)
+
 add_subdirectory(Apache.Geode.Examples.PutGetRemove)
diff --git a/examples/dotnet/cmake/FindGeodeAssembly.cmake 
b/examples/dotnet/cmake/FindGeodeAssembly.cmake
new file mode 100644
index 0000000..3c0208c
--- /dev/null
+++ b/examples/dotnet/cmake/FindGeodeAssembly.cmake
@@ -0,0 +1,16 @@
+set(GEODE_ASSEMBLY_DEBUG_IN_BUILT_SOURCE_TREE 
"${CMAKE_CURRENT_SOURCE_DIR}/../../build/clicache/src/Debug/Apache.Geode.dll")
+set(GEODE_ASSEMBLY_IN_BUILT_SOURCE_TREE 
"${CMAKE_CURRENT_SOURCE_DIR}/../../build/clicache/src/Release/Apache.Geode.dll")
+set(GEODE_ASSEMBLY_IN_INSTALL_TREE 
"${CMAKE_CURRENT_SOURCE_DIR}/../../bin/Apache.Geode.dll")
+
+
+if (EXISTS ${GEODE_ASSEMBLY_IN_INSTALL_TREE})
+       set(GEODE_ASSEMBLY ${GEODE_ASSEMBLY_IN_INSTALL_TREE})
+elseif (EXISTS ${GEODE_ASSEMBLY_DEBUG_IN_BUILT_SOURCE_TREE})
+       set(GEODE_ASSEMBLY ${GEODE_ASSEMBLY_DEBUG_IN_BUILT_SOURCE_TREE})
+elseif (EXISTS ${GEODE_ASSEMBLY_IN_BUILT_SOURCE_TREE})
+       set(GEODE_ASSEMBLY ${GEODE_ASSEMBLY_IN_BUILT_SOURCE_TREE})
+else()
+       set(GEODE_ASSEMBLY "GEODE_ASSEMBLY-NOT_FOUND")
+endif()
+
+message(STATUS "Geode assembly located at ${GEODE_ASSEMBLY}")

-- 
To stop receiving notification emails like this one, please contact
echobr...@apache.org.

Reply via email to