Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ hunter_default_version(OpenCV VERSION 4.10.0-p0)
hunter_default_version(OpenCV-Extra VERSION 4.10.0)
hunter_default_version(OpenEXR VERSION 3.1.5-p0)
hunter_default_version(OpenGL-Registry VERSION 0.0.0-d15191e-p0)
hunter_default_version(OpenJPH VERSION 0.23.0)
hunter_default_version(OpenNMTTokenizer VERSION 1.11.0-p1)
hunter_default_version(OpenSSL VERSION 3.0.12)
hunter_default_version(OpenSceneGraph VERSION 3.6.3-p0)
Expand Down
33 changes: 33 additions & 0 deletions cmake/projects/OpenJPH/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) 2025, NeroBurner
# All rights reserved.

# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_cmake_args)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
PACKAGE_NAME
OpenJPH
VERSION
0.23.0
URL
"https://github.com/aous72/OpenJPH/archive/0.23.0.tar.gz"
SHA1
a702c867373b58dca9fe7a61f46b3ef440161d68
)

hunter_cmake_args(
OpenJPH
CMAKE_ARGS
OJPH_ENABLE_TIFF_SUPPORT=NO # 0.23.0 not hunterized, no dependencies allowed
OJPH_BUILD_EXECUTABLES=NO
OJPH_BUILD_TESTS=NO
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(OpenJPH)
hunter_download(PACKAGE_NAME OpenJPH)
21 changes: 21 additions & 0 deletions docs/packages/pkg/OpenJPH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
```{spelling:word-list}

OpenJPH
```

```{index} single: media ; OpenJPH
```

(pkg.OpenJPH)=

# OpenJPH

- [Official](https://github.com/aous72/OpenJPH)
- [Example](https://github.com/cpp-pm/hunter/blob/master/examples/OpenJPH/CMakeLists.txt)
- Added by [NeroBurner](https://github.com/NeroBurner) ([pr-814](https://github.com/cpp-pm/hunter/pull/814))

```{literalinclude} /../examples/OpenJPH/CMakeLists.txt
:language: cmake
:start-after: "# DOCUMENTATION_START {"
:end-before: "# DOCUMENTATION_END }"
```
18 changes: 18 additions & 0 deletions examples/OpenJPH/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2025, NeroBurner
# All rights reserved.

cmake_minimum_required(VERSION 3.10)

# Emulate HunterGate:
# * https://github.com/hunter-packages/gate
include("../common.cmake")

project(download-OpenJPH)

# DOCUMENTATION_START {
hunter_add_package(OpenJPH)
find_package(OpenJPH CONFIG REQUIRED)

add_executable(boo boo.cpp)
target_link_libraries(boo PUBLIC openjph)
# DOCUMENTATION_END }
13 changes: 13 additions & 0 deletions examples/OpenJPH/boo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <openjph/ojph_version.h>
#include <openjph/ojph_arch.h>

#include <iostream>

int main() {
std::cout << "OpenJPH version: "
<< OPENJPH_VERSION_MAJOR << "."
<< OPENJPH_VERSION_MINOR << "."
<< OPENJPH_VERSION_PATCH << std::endl;
std::cout << "arch level: " << ojph::get_cpu_ext_level() << std::endl;
return 0;
}