aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaeseung Ha <ipknhama@gmail.com>2017-09-17 14:47:42 +0900
committerGitHub <noreply@github.com>2017-09-17 14:47:42 +0900
commitc550c2bab09cd07169d06fd8bf60d036ae51189b (patch)
tree64e9d0cf469c844a9546c20e0f92dfb8d6ac4c32
parent05fdf17795b7ded0c1a3fcf94d4ea5bf0e31ead0 (diff)
parentc03d3b2d5aebbfc11fd85af93d6c389ca4d39d73 (diff)
downloadcrow-c550c2bab09cd07169d06fd8bf60d036ae51189b.tar.gz
crow-c550c2bab09cd07169d06fd8bf60d036ae51189b.zip
Merge pull request #198 from javierjeronimo/master
Add compatibility with conan.io
-rw-r--r--.gitignore3
-rw-r--r--CMakeLists.txt10
-rw-r--r--conanfile.py28
3 files changed, 39 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 6dcb0a2..cfe8b64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,3 +33,6 @@ build
.directory
crow_all.h
+
+# conan.io
+build/
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e2d3bc7..f7f2d99 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,11 @@
cmake_minimum_required(VERSION 2.8)
project (crow_all)
+
+if(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
+include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
+conan_basic_setup()
+endif()
+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
find_package(Tcmalloc)
find_package(Threads)
@@ -24,13 +30,13 @@ endif()
include_directories( ${Boost_INCLUDE_DIR} )
-set(PROJECT_INCLUDE_DIR
+set(PROJECT_INCLUDE_DIR
${PROJECT_SOURCE_DIR}/include
)
include_directories("${PROJECT_INCLUDE_DIR}")
include_directories("${PROJECT_SOURCE_DIR}")
-
+
#add_subdirectory(src)
add_subdirectory(examples)
if (MSVC)
diff --git a/conanfile.py b/conanfile.py
new file mode 100644
index 0000000..a8eb8c1
--- /dev/null
+++ b/conanfile.py
@@ -0,0 +1,28 @@
+from conans import ConanFile, CMake
+
+
+class CrowConan(ConanFile):
+ name = "Crow"
+ version = "0.1"
+ url = "https://github.com/javierjeronimo/crow"
+ license = "see https://github.com/ipkn/crow/blob/master/LICENSE"
+ generators = "cmake"
+ settings = "os", "compiler", "build_type", "arch"
+
+ requires = (("Boost/1.60.0@lasote/stable"),
+ ("OpenSSL/1.0.2i@lasote/stable"))
+
+ # No exports necessary
+
+ def source(self):
+ # this will create a hello subfolder, take it into account
+ self.run("git clone https://github.com/javierjeronimo/crow.git")
+
+ def build(self):
+ cmake = CMake(self.settings)
+ self.run('cmake %s/crow %s' % (self.conanfile_directory, cmake.command_line))
+ self.run("cmake --build . %s" % cmake.build_config)
+ self.run("make")
+
+ def package(self):
+ self.copy("*.h", dst="include", src="amalgamate")