-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from jw3/issue-8
Clone during packaging resolves #8
- Loading branch information
Showing
26 changed files
with
161 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
[requires] | ||
particle-common/0.2.2@jw3/stable | ||
TinyGpsPlus/0.2.2@jw3/stable | ||
TMCStepper/0.2.2@jw3/stable | ||
particle-common/snapshot@jw3/stable | ||
TinyGpsPlus/snapshot@jw3/stable | ||
|
||
[generators] | ||
cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,10 @@ | ||
include(ExternalProject) | ||
set(AssetTrackerRK_Install assettrackerrk) | ||
|
||
set(AssetTrackerRK ${CONAN_ASSETTRACKERRK_ROOT}) | ||
include(LIS3DH) | ||
|
||
externalproject_add( | ||
${AssetTrackerRK_Install} | ||
GIT_REPOSITORY https://github.com/rickkas7/AssetTrackerRK.git | ||
GIT_TAG b913c5ac4967e83c466d8f079857ef349f8e7f69 | ||
PATCH_COMMAND "" | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
INSTALL_COMMAND "" | ||
UPDATE_COMMAND "" | ||
LOG_DOWNLOAD ON) | ||
|
||
externalproject_get_property(${AssetTrackerRK_Install} source_dir) | ||
set(AssetTrackerRK ${source_dir}/src) | ||
|
||
set(SOURCE_FILES | ||
${AssetTrackerRK}/TinyGPS++.cpp | ||
${AssetTrackerRK}/AssetTrackerRK.cpp) | ||
|
||
foreach (f IN ITEMS ${SOURCE_FILES}) | ||
if (NOT EXISTS ${f}) | ||
file(WRITE ${f}) | ||
endif () | ||
endforeach () | ||
file(GLOB SOURCE_FILES ${AssetTrackerRK}/src/*) | ||
|
||
add_library(AssetTrackerRK STATIC ${SOURCE_FILES}) | ||
target_include_directories(AssetTrackerRK PRIVATE ${AssetTrackerRK} ${LIS3DH} ${PLATFORM_CXX_INCLUDES}) | ||
target_include_directories(AssetTrackerRK PRIVATE ${AssetTrackerRK}/include ${LIS3DH}/include ${PLATFORM_CXX_INCLUDES}) | ||
target_compile_options(AssetTrackerRK PRIVATE "$<$<CONFIG:ALL>:${PLATFORM_CXX_FLAGS}>") | ||
target_compile_definitions(AssetTrackerRK PRIVATE ${PLATFORM_CXX_DEFS}) | ||
add_dependencies(AssetTrackerRK ${AssetTrackerRK_Install} LIS3DH) | ||
add_dependencies(AssetTrackerRK LIS3DH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
from conans import ConanFile, tools | ||
import os | ||
|
||
repo_url = 'https://github.com/rickkas7/AssetTrackerRK.git' | ||
commit_sha = 'b913c5ac4967e83c466d8f079857ef349f8e7f69' | ||
build_dir = os.getenv("BUILD_DIR", "build") | ||
source_dir = os.getenv("PKG_SRC_DIR", None) | ||
|
||
def lookup(name, default = None): | ||
|
||
def lookup(name, default=None): | ||
v = default | ||
if os.path.exists(build_dir + "/" + name): | ||
v = tools.load(build_dir + "/" + name) | ||
return os.getenv("CONAN_" + name, v) | ||
|
||
|
||
class ParticlePackage(ConanFile): | ||
name = "AssetTrackerRK" | ||
version = lookup("VERSION", "snapshot") | ||
settings = "os", "compiler", "build_type", "arch" | ||
url = "https://github.com/jw3/particle-cmakes" | ||
url = "https://github.com/jw3/conan-particle" | ||
exports = build_dir + "/VERSION" | ||
generators = "cmake" | ||
requires = [] | ||
requires = ['LIS3DH/9.9.9.9@jw3/stable'] | ||
|
||
def package(self): | ||
self.copy("*.cmake", src="cmake") | ||
self.copy("*.cmake", src=f"{source_dir}/cmake") | ||
self.copy("*.c*", dst="src", src='src') | ||
self.copy("*.h*", dst="include", src='src') | ||
|
||
def source(self): | ||
self.run(f"git clone {repo_url} .") | ||
if commit_sha: | ||
self.run(f"git checkout {commit_sha}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,10 @@ | ||
include(ExternalProject) | ||
set(DS18B20_Install ds18b20) | ||
|
||
set(DS18B20 ${CONAN_DS18B20_ROOT}) | ||
include(OneWire) | ||
|
||
externalproject_add( | ||
${DS18B20_Install} | ||
GIT_REPOSITORY https://github.com/tomdeboer/SparkCoreDallasTemperature.git | ||
GIT_TAG 5f5dbea7cb131eb801dfb1fec0338df0a20dced9 | ||
PATCH_COMMAND ${CONAN_PARTICLE-COMMON_ROOT}/bin/apply.sh ${CONAN_DS18B20_ROOT}/patch | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
INSTALL_COMMAND "" | ||
UPDATE_COMMAND "" | ||
LOG_DOWNLOAD ON) | ||
|
||
externalproject_get_property(${DS18B20_Install} source_dir) | ||
set(DS18B20 ${source_dir}/firmware) | ||
|
||
set(SOURCE_FILES ${DS18B20}/spark-dallas-temperature.cpp) | ||
if (NOT EXISTS ${SOURCE_FILES}) | ||
file(WRITE ${SOURCE_FILES}) | ||
endif () | ||
file(GLOB SOURCE_FILES ${DS18B20}/src/*) | ||
|
||
add_library(DS18B20 STATIC ${SOURCE_FILES}) | ||
target_include_directories(DS18B20 PRIVATE ${DS18B20} ${OneWire} ${PLATFORM_CXX_INCLUDES}) | ||
target_include_directories(DS18B20 PRIVATE ${DS18B20}/include ${OneWire}/include ${PLATFORM_CXX_INCLUDES}) | ||
target_compile_options(DS18B20 PRIVATE "$<$<CONFIG:ALL>:${PLATFORM_CXX_FLAGS}>") | ||
target_compile_definitions(DS18B20 PRIVATE ${PLATFORM_CXX_DEFS}) | ||
add_dependencies(DS18B20 ${DS18B20_Install} OneWire) | ||
add_dependencies(DS18B20 OneWire) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,35 @@ | ||
from conans import ConanFile, tools | ||
import os | ||
|
||
repo_url = 'https://github.com/tomdeboer/SparkCoreDallasTemperature.git' | ||
commit_sha = '5f5dbea7cb131eb801dfb1fec0338df0a20dced9' | ||
build_dir = os.getenv("BUILD_DIR", "build") | ||
source_dir = os.getenv("PKG_SRC_DIR", None) | ||
|
||
def lookup(name, default = None): | ||
|
||
def lookup(name, default=None): | ||
v = default | ||
if os.path.exists(build_dir + "/" + name): | ||
v = tools.load(build_dir + "/" + name) | ||
return os.getenv("CONAN_" + name, v) | ||
|
||
|
||
class ParticlePackage(ConanFile): | ||
name = "DS18B20" | ||
version = lookup("VERSION", "snapshot") | ||
settings = "os", "compiler", "build_type", "arch" | ||
url = "https://github.com/jw3/particle-cmakes" | ||
url = "https://github.com/jw3/conan-particle" | ||
exports = build_dir + "/VERSION" | ||
generators = "cmake" | ||
requires = "OneWire/" + version + "@jw3/stable" | ||
|
||
def package(self): | ||
self.copy("*.cmake", src="cmake") | ||
self.copy("*.patch", src="patch", dst="patch", keep_path=True) | ||
self.copy("*.cmake", src=f"{source_dir}/cmake") | ||
self.copy("*.c*", dst="src", src='firmware') | ||
self.copy("*.h*", dst="include", src='firmware') | ||
|
||
def source(self): | ||
self.run(f"git clone {repo_url} .") | ||
if commit_sha: | ||
self.run(f"git checkout {commit_sha}") | ||
tools.patch(patch_file=f"{source_dir}/patch/0001-include-cmath.patch") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,8 @@ | ||
include(ExternalProject) | ||
set(LIS3DH_Install lis3dh) | ||
set(LIS3DH ${CONAN_LIS3DH_ROOT}) | ||
|
||
externalproject_add( | ||
${LIS3DH_Install} | ||
GIT_REPOSITORY https://github.com/rickkas7/LIS3DH.git | ||
GIT_TAG 8d8f331dd6cfce93380de2988693832a3397f03e | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
INSTALL_COMMAND "" | ||
UPDATE_COMMAND "" | ||
LOG_DOWNLOAD ON) | ||
|
||
externalproject_get_property(${LIS3DH_Install} source_dir) | ||
set(LIS3DH ${source_dir}/src) | ||
|
||
set(SOURCE_FILES ${LIS3DH}/LIS3DH.cpp) | ||
if (NOT EXISTS ${SOURCE_FILES}) | ||
file(WRITE ${SOURCE_FILES}) | ||
endif () | ||
file(GLOB SOURCE_FILES ${LIS3DH}/src/*) | ||
|
||
add_library(LIS3DH STATIC ${SOURCE_FILES}) | ||
target_include_directories(LIS3DH PRIVATE ${LIS3DH} ${PLATFORM_CXX_INCLUDES}) | ||
target_include_directories(LIS3DH PRIVATE ${LIS3DH}/include ${PLATFORM_CXX_INCLUDES}) | ||
target_compile_options(LIS3DH PRIVATE "$<$<CONFIG:ALL>:${PLATFORM_CXX_FLAGS}>") | ||
target_compile_definitions(LIS3DH PRIVATE ${PLATFORM_CXX_DEFS}) | ||
add_dependencies(LIS3DH ${LIS3DH_Install}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
from conans import ConanFile, tools | ||
import os | ||
|
||
repo_url = 'https://github.com/rickkas7/LIS3DH.git' | ||
commit_sha = '8d8f331dd6cfce93380de2988693832a3397f03e' | ||
build_dir = os.getenv("BUILD_DIR", "build") | ||
source_dir = os.getenv("PKG_SRC_DIR", None) | ||
|
||
def lookup(name, default = None): | ||
|
||
def lookup(name, default=None): | ||
v = default | ||
if os.path.exists(build_dir + "/" + name): | ||
v = tools.load(build_dir + "/" + name) | ||
return os.getenv("CONAN_" + name, v) | ||
|
||
|
||
class ParticlePackage(ConanFile): | ||
name = "LIS3DH" | ||
version = lookup("VERSION", "snapshot") | ||
settings = "os", "compiler", "build_type", "arch" | ||
url = "https://github.com/jw3/particle-cmakes" | ||
url = "https://github.com/jw3/conan-particle" | ||
exports = build_dir + "/VERSION" | ||
generators = "cmake" | ||
requires = [] | ||
|
||
def package(self): | ||
self.copy("*.cmake", src="cmake") | ||
self.copy("*.cmake", src=f"{source_dir}/cmake") | ||
self.copy("*.c*", dst="src", src='src') | ||
self.copy("*.h*", dst="include", src='src') | ||
|
||
def source(self): | ||
self.run(f"git clone {repo_url} .") | ||
if commit_sha: | ||
self.run(f"git checkout {commit_sha}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,8 @@ | ||
include(ExternalProject) | ||
set(LiquidCrystalI2C_Install lcdi2c) | ||
set(LiquidCrystalI2C ${CONAN_LIQUIDCRYSTALI2C_ROOT}) | ||
|
||
externalproject_add( | ||
${LiquidCrystalI2C_Install} | ||
GIT_REPOSITORY https://github.com/BulldogLowell/LiquidCrystal_I2C_Spark.git | ||
GIT_TAG master | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
INSTALL_COMMAND "" | ||
UPDATE_COMMAND "" | ||
LOG_DOWNLOAD ON) | ||
|
||
externalproject_get_property(${LiquidCrystalI2C_Install} source_dir) | ||
set(LiquidCrystalI2C ${source_dir}/firmware) | ||
|
||
set(SOURCE_FILES ${LiquidCrystalI2C}/LiquidCrystal_I2C_Spark.cpp) | ||
if (NOT EXISTS ${SOURCE_FILES}) | ||
file(WRITE ${SOURCE_FILES}) | ||
endif () | ||
file(GLOB SOURCE_FILES ${AssetTrackerRK}/src/*) | ||
|
||
add_library(LiquidCrystalI2C STATIC ${SOURCE_FILES}) | ||
target_include_directories(LiquidCrystalI2C PRIVATE ${LiquidCrystalI2C} ${PLATFORM_CXX_INCLUDES}) | ||
target_include_directories(LiquidCrystalI2C PRIVATE ${LiquidCrystalI2C}/include ${PLATFORM_CXX_INCLUDES}) | ||
target_compile_options(LiquidCrystalI2C PRIVATE "$<$<CONFIG:ALL>:${PLATFORM_CXX_FLAGS}>") | ||
target_compile_definitions(LiquidCrystalI2C PRIVATE ${PLATFORM_CXX_DEFS}) | ||
add_dependencies(LiquidCrystalI2C ${LiquidCrystalI2C_Install}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
from conans import ConanFile, tools | ||
import os | ||
|
||
repo_url = 'https://github.com/BulldogLowell/LiquidCrystal_I2C_Spark.git' | ||
commit_sha = '' | ||
build_dir = os.getenv("BUILD_DIR", "build") | ||
source_dir = os.getenv("PKG_SRC_DIR", None) | ||
|
||
def lookup(name, default = None): | ||
|
||
def lookup(name, default=None): | ||
v = default | ||
if os.path.exists(build_dir + "/" + name): | ||
v = tools.load(build_dir + "/" + name) | ||
return os.getenv("CONAN_" + name, v) | ||
|
||
|
||
class ParticlePackage(ConanFile): | ||
name = "LiquidCrystalI2C" | ||
version = lookup("VERSION", "snapshot") | ||
settings = "os", "compiler", "build_type", "arch" | ||
url = "https://github.com/jw3/particle-cmakes" | ||
url = "https://github.com/jw3/conan-particle" | ||
exports = build_dir + "/VERSION" | ||
generators = "cmake" | ||
requires = [] | ||
|
||
def package(self): | ||
self.copy("*.cmake", src="cmake") | ||
self.copy("*.cmake", src=f"{source_dir}/cmake") | ||
self.copy("*.c*", dst="src", src='firmware') | ||
self.copy("*.h*", dst="include", src='firmware') | ||
|
||
def source(self): | ||
self.run(f"git clone {repo_url} .") | ||
if commit_sha: | ||
self.run(f"git checkout {commit_sha}") |
Oops, something went wrong.