Skip to content

Commit e90df2e

Browse files
authored
Add new package OpenJPH 0.23.0 (#814)
Add upstream version of package `OpenJPH`. The `TIFF` dependency is optional and I had some issues when adding `hunter_add_package(TIFF)` with missing includes. So adding with `TIFF` disabled. Fixes: #805
1 parent 4e67b30 commit e90df2e

File tree

5 files changed

+86
-0
lines changed

5 files changed

+86
-0
lines changed

cmake/configs/default.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ hunter_default_version(OpenCV VERSION 4.10.0-p0)
107107
hunter_default_version(OpenCV-Extra VERSION 4.10.0)
108108
hunter_default_version(OpenEXR VERSION 3.1.5-p0)
109109
hunter_default_version(OpenGL-Registry VERSION 0.0.0-d15191e-p0)
110+
hunter_default_version(OpenJPH VERSION 0.23.0)
110111
hunter_default_version(OpenNMTTokenizer VERSION 1.11.0-p1)
111112
hunter_default_version(OpenSSL VERSION 3.0.12)
112113
hunter_default_version(OpenSceneGraph VERSION 3.6.3-p0)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright (c) 2025, NeroBurner
2+
# All rights reserved.
3+
4+
# !!! DO NOT PLACE HEADER GUARDS HERE !!!
5+
6+
include(hunter_add_version)
7+
include(hunter_cacheable)
8+
include(hunter_cmake_args)
9+
include(hunter_download)
10+
include(hunter_pick_scheme)
11+
12+
hunter_add_version(
13+
PACKAGE_NAME
14+
OpenJPH
15+
VERSION
16+
0.23.0
17+
URL
18+
"https://github.com/aous72/OpenJPH/archive/0.23.0.tar.gz"
19+
SHA1
20+
a702c867373b58dca9fe7a61f46b3ef440161d68
21+
)
22+
23+
hunter_cmake_args(
24+
OpenJPH
25+
CMAKE_ARGS
26+
OJPH_ENABLE_TIFF_SUPPORT=NO # 0.23.0 not hunterized, no dependencies allowed
27+
OJPH_BUILD_EXECUTABLES=NO
28+
OJPH_BUILD_TESTS=NO
29+
)
30+
31+
hunter_pick_scheme(DEFAULT url_sha1_cmake)
32+
hunter_cacheable(OpenJPH)
33+
hunter_download(PACKAGE_NAME OpenJPH)

docs/packages/pkg/OpenJPH.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
```{spelling:word-list}
2+
3+
OpenJPH
4+
```
5+
6+
```{index} single: media ; OpenJPH
7+
```
8+
9+
(pkg.OpenJPH)=
10+
11+
# OpenJPH
12+
13+
- [Official](https://github.com/aous72/OpenJPH)
14+
- [Example](https://github.com/cpp-pm/hunter/blob/master/examples/OpenJPH/CMakeLists.txt)
15+
- Added by [NeroBurner](https://github.com/NeroBurner) ([pr-814](https://github.com/cpp-pm/hunter/pull/814))
16+
17+
```{literalinclude} /../examples/OpenJPH/CMakeLists.txt
18+
:language: cmake
19+
:start-after: "# DOCUMENTATION_START {"
20+
:end-before: "# DOCUMENTATION_END }"
21+
```

examples/OpenJPH/CMakeLists.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright (c) 2025, NeroBurner
2+
# All rights reserved.
3+
4+
cmake_minimum_required(VERSION 3.10)
5+
6+
# Emulate HunterGate:
7+
# * https://github.com/hunter-packages/gate
8+
include("../common.cmake")
9+
10+
project(download-OpenJPH)
11+
12+
# DOCUMENTATION_START {
13+
hunter_add_package(OpenJPH)
14+
find_package(OpenJPH CONFIG REQUIRED)
15+
16+
add_executable(boo boo.cpp)
17+
target_link_libraries(boo PUBLIC openjph)
18+
# DOCUMENTATION_END }

examples/OpenJPH/boo.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include <openjph/ojph_version.h>
2+
#include <openjph/ojph_arch.h>
3+
4+
#include <iostream>
5+
6+
int main() {
7+
std::cout << "OpenJPH version: "
8+
<< OPENJPH_VERSION_MAJOR << "."
9+
<< OPENJPH_VERSION_MINOR << "."
10+
<< OPENJPH_VERSION_PATCH << std::endl;
11+
std::cout << "arch level: " << ojph::get_cpu_ext_level() << std::endl;
12+
return 0;
13+
}

0 commit comments

Comments
 (0)