Skip to content

Commit

Permalink
Merge pull request #1044 from trassir/add-conanfile-jsoncpp-1.8.3
Browse files Browse the repository at this point in the history
Update conanfile for building jsoncpp 1.8.3
  • Loading branch information
danimtb authored Mar 24, 2020
2 parents 28e3133 + c63bd36 commit c29df5b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions recipes/jsoncpp/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ sources:
"1.9.2":
url: https://github.com/open-source-parsers/jsoncpp/archive/1.9.2.tar.gz
sha256: 77a402fb577b2e0e5d0bdc1cf9c65278915cdb25171e3452c68b6da8a561f8f0
"1.8.3":
url: https://github.com/open-source-parsers/jsoncpp/archive/1.8.3.tar.gz
sha256: 3671ba6051e0f30849942cc66d1798fdf0362d089343a83f704c09ee7156604f
7 changes: 4 additions & 3 deletions recipes/jsoncpp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ def _patch_sources(self):
tools.replace_in_file(os.path.join(self._source_subfolder, "src", "lib_json", "CMakeLists.txt"),
"set_target_properties( jsoncpp_lib PROPERTIES POSITION_INDEPENDENT_CODE ON)",
"set_target_properties( jsoncpp_lib PROPERTIES POSITION_INDEPENDENT_CODE OFF)")
tools.replace_in_file(os.path.join(self._source_subfolder, "src", "lib_json", "CMakeLists.txt"),
"$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/json>",
"")
if tools.Version(self.version) > "1.9.0":
tools.replace_in_file(os.path.join(self._source_subfolder, "src", "lib_json", "CMakeLists.txt"),
"$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/json>",
"")
tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"),
"add_subdirectory( example )",
"",
Expand Down
2 changes: 1 addition & 1 deletion recipes/jsoncpp/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project(test_package)
cmake_minimum_required(VERSION 2.8.12)
project(test_package)

SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
2 changes: 2 additions & 0 deletions recipes/jsoncpp/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.8.3":
folder: all
"1.9.1":
folder: all
"1.9.2":
Expand Down

0 comments on commit c29df5b

Please sign in to comment.