mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
build-all.py - bump json version and use find_package
This commit is contained in:
+13
-8
@@ -131,7 +131,7 @@ USE_CURRENT_PYTHON_VERSION = os.getenv("USE_CURRENT_PYTHON_VERSION")
|
|||||||
ADD_COMMIT_SHA = os.getenv("ADD_COMMIT_SHA")
|
ADD_COMMIT_SHA = os.getenv("ADD_COMMIT_SHA")
|
||||||
|
|
||||||
PYTHON_VERSIONS = ["3.9.11", "3.10.3", "3.11.8", "3.12.1", "3.13.0"]
|
PYTHON_VERSIONS = ["3.9.11", "3.10.3", "3.11.8", "3.12.1", "3.13.0"]
|
||||||
JSON_VERSION = "v3.6.1"
|
JSON_VERSION = "3.10.0"
|
||||||
OCE_VERSION = "0.18.3"
|
OCE_VERSION = "0.18.3"
|
||||||
OCCT_VERSION = "7.8.1"
|
OCCT_VERSION = "7.8.1"
|
||||||
BOOST_VERSION = "1.86.0"
|
BOOST_VERSION = "1.86.0"
|
||||||
@@ -743,12 +743,17 @@ if "hdf5" in targets:
|
|||||||
|
|
||||||
|
|
||||||
if "json" in targets:
|
if "json" in targets:
|
||||||
json_url = f"https://github.com/nlohmann/json/releases/download/{JSON_VERSION}/json.hpp"
|
dependency_name = f"json-{JSON_VERSION}"
|
||||||
json_install_path = f"{DEPS_DIR}/install/json/nlohmann/json.hpp"
|
build_dependency(
|
||||||
if not os.path.exists(os.path.dirname(json_install_path)):
|
name=dependency_name,
|
||||||
os.makedirs(os.path.dirname(json_install_path))
|
mode="cmake",
|
||||||
if not os.path.exists(json_install_path):
|
build_tool_args=[
|
||||||
urlretrieve(json_url, json_install_path)
|
f"-DCMAKE_INSTALL_PREFIX={DEPS_DIR}/install/{dependency_name}",
|
||||||
|
"-DJSON_BuildTests=OFF",
|
||||||
|
],
|
||||||
|
download_url=f"https://github.com/nlohmann/json/releases/download/v{JSON_VERSION}",
|
||||||
|
download_name="json.tar.xz",
|
||||||
|
)
|
||||||
|
|
||||||
if "eigen" in targets:
|
if "eigen" in targets:
|
||||||
dependency_name = f"eigen-install-{EIGEN_VERSION}"
|
dependency_name = f"eigen-install-{EIGEN_VERSION}"
|
||||||
@@ -1116,7 +1121,6 @@ cmake_args = [
|
|||||||
"-DBUILD_EXAMPLES=OFF",
|
"-DBUILD_EXAMPLES=OFF",
|
||||||
"-DBUILD_SHARED_LIBS=" + OFF_ON[not BUILD_STATIC],
|
"-DBUILD_SHARED_LIBS=" + OFF_ON[not BUILD_STATIC],
|
||||||
"-DGLTF_SUPPORT=ON",
|
"-DGLTF_SUPPORT=ON",
|
||||||
f"-DJSON_INCLUDE_DIR={DEPS_DIR}/install/json",
|
|
||||||
"-DBoost_NO_BOOST_CMAKE=On",
|
"-DBoost_NO_BOOST_CMAKE=On",
|
||||||
"-DADD_COMMIT_SHA=" + ("On" if ADD_COMMIT_SHA else "Off"),
|
"-DADD_COMMIT_SHA=" + ("On" if ADD_COMMIT_SHA else "Off"),
|
||||||
"-DVERSION_OVERRIDE=" + ("On" if ADD_COMMIT_SHA else "Off"),
|
"-DVERSION_OVERRIDE=" + ("On" if ADD_COMMIT_SHA else "Off"),
|
||||||
@@ -1125,6 +1129,7 @@ cmake_args = [
|
|||||||
cmake_args_prefix_path: list[str] = [
|
cmake_args_prefix_path: list[str] = [
|
||||||
f"{DEPS_DIR}/install/boost-{BOOST_VERSION}",
|
f"{DEPS_DIR}/install/boost-{BOOST_VERSION}",
|
||||||
f"{DEPS_DIR}/install/eigen-install-{EIGEN_VERSION}",
|
f"{DEPS_DIR}/install/eigen-install-{EIGEN_VERSION}",
|
||||||
|
f"{DEPS_DIR}/install/json-{JSON_VERSION}",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user