Compare commits

...
6 Commits
Author SHA1 Message Date
Cary Phillips 456bf42dc2 Pin IMATH_TAG to v3.1.9
Signed-off-by: Cary Phillips <cary@ilm.com>
2023-08-28 10:56:26 -07:00
Cary Phillips fdaee4bd27 Remove -dev setting from release type
Signed-off-by: Cary Phillips <cary@ilm.com>
2023-08-28 10:50:44 -07:00
Cary Phillips 4713cf0da6 OpenEXRConfig.h.in uses version extracted from openexr_version.h (#1527)
* OpenEXRConfig.h.in uses version extracted from openexr_version.h

The logic was already in place to extract the version from
`openexr_version.h`, so the `.in` file just needed to reference the
proper CMake variables. This also duplicates the `OpenEXR_VERSION_*`
settings to `OPENEXR_VERSION_*`.

Signed-off-by: Cary Phillips <cary@ilm.com>

* bazel

Signed-off-by: Cary Phillips <cary@ilm.com>

* comment

Signed-off-by: Cary Phillips <cary@ilm.com>

* fix formatting of core version test error message

Signed-off-by: Cary Phillips <cary@ilm.com>

* fix extra comparison test

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>
2023-08-28 10:45:58 -07:00
Cary Phillips b2cfe364db Add 1523, 1525, 1527 to notes
Signed-off-by: Cary Phillips <cary@ilm.com>
2023-08-28 09:32:39 -07:00
Vertexwahn a8609d9252 Add bzlmod support (#1525)
Signed-off-by: Vertexwahn <julian.amann@tum.de>
2023-08-28 09:29:05 -07:00
Cary Phillips 311c6e691e Add DEPENDENCIES Imath::Imath for OpenEXRCore (#1523)
This frees exrinfo and any other external application from any special
settings to pick up the necessary Imath #includes.

Signed-off-by: Cary Phillips <cary@ilm.com>
2023-08-28 09:28:57 -07:00
12 changed files with 60 additions and 41 deletions
+9
View File
@@ -55,6 +55,9 @@ jobs:
run: |
bazelisk build //...
bazelisk test //...
# Test bzlmod
bazelisk build --enable_bzlmod -- //...
bazelisk test --enable_bzlmod -- //...
build_and_test_windows:
name: Windows Server 2022 build <Visual Studio 2022>
@@ -73,6 +76,9 @@ jobs:
run: |
bazelisk build //...
bazelisk test //...
# Test bzlmod
bazelisk build --enable_bzlmod -- //...
bazelisk test --enable_bzlmod -- //...
build_and_test_macos:
name: macOS 13 Bazel build <Apple Clang14>
@@ -91,3 +97,6 @@ jobs:
run: |
bazelisk build //...
bazelisk test //...
# Test bzlmod
bazelisk build --enable_bzlmod -- //...
bazelisk test --enable_bzlmod -- //...
+3
View File
@@ -54,6 +54,9 @@ expand_template(
"@OPENEXR_PACKAGE_NAME@": "OpenEXR 3.2.0",
"@OPENEXR_VERSION_EXTRA@": "",
"@OPENEXR_VERSION@": "3.2.0",
"@OPENEXR_VERSION_MAJOR@": "3",
"@OPENEXR_VERSION_MINOR@": "2",
"@OPENEXR_VERSION_PATCH@": "0",
"#cmakedefine OPENEXR_ENABLE_API_VISIBILITY": "#define OPENEXR_ENABLE_API_VISIBILITY",
"#cmakedefine OPENEXR_HAVE_LARGE_STACK 1": "/* #undef OPENEXR_HAVE_LARGE_STACK */",
},
+6
View File
@@ -187,6 +187,12 @@ Direct-leak in ``Imf_3_1::RgbaInputFile::RgbaInputFile``
### Merged Pull Requests
* [1527](https://github.com/AcademySoftwareFoundation/openexr/pull/1527)
`OpenEXRConfig.h.in` uses version extracted from `openexr_version.h`
* [1525](https://github.com/AcademySoftwareFoundation/openexr/pull/1525)
Add bzlmod support
* [1523](https://github.com/AcademySoftwareFoundation/openexr/pull/1523)
Add `DEPENDENCIES Imath::Imath` for OpenEXRCore (#1523)
* [1522](https://github.com/AcademySoftwareFoundation/openexr/pull/1522)
Rename cifuzz workflow to OSS-Fuzz, and filter out unnecessary triggers
* [1520](https://github.com/AcademySoftwareFoundation/openexr/pull/1520)
+5 -5
View File
@@ -21,15 +21,15 @@ endif()
file(READ "src/lib/OpenEXRCore/openexr_version.h" VERSION_H)
string(REGEX MATCH "VERSION_MAJOR ([0-9]*)" _ ${VERSION_H})
set(VER_MAJ ${CMAKE_MATCH_1})
set(OPENEXR_VERSION_MAJOR ${CMAKE_MATCH_1})
string(REGEX MATCH "VERSION_MINOR ([0-9]*)" _ ${VERSION_H})
set(VER_MIN ${CMAKE_MATCH_1})
set(OPENEXR_VERSION_MINOR ${CMAKE_MATCH_1})
string(REGEX MATCH "VERSION_PATCH ([0-9]*)" _ ${VERSION_H})
set(VER_PCH ${CMAKE_MATCH_1})
set(OPENEXR_VERSION_PATCH ${CMAKE_MATCH_1})
project(OpenEXR VERSION ${VER_MAJ}.${VER_MIN}.${VER_PCH} LANGUAGES C CXX)
project(OpenEXR VERSION ${OPENEXR_VERSION_MAJOR}.${OPENEXR_VERSION_MINOR}.${OPENEXR_VERSION_PATCH} LANGUAGES C CXX)
set(OPENEXR_VERSION_RELEASE_TYPE "-dev" CACHE STRING "Extra version tag string for OpenEXR build, such as -dev, -beta1, etc.")
set(OPENEXR_VERSION_RELEASE_TYPE "" CACHE STRING "Extra version tag string for OpenEXR build, such as -dev, -beta1, etc.")
set(OPENEXR_VERSION ${OpenEXR_VERSION})
set(OPENEXR_VERSION_API "${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}")
+9
View File
@@ -0,0 +1,9 @@
module(
name = "openexr",
version = "0.0.0", # The version "0.0.0" is set here and will be patched within the Bazel Central Registry
compatibility_level = 1,
)
bazel_dep(name = "bazel_skylib", version = "1.4.2")
bazel_dep(name = "imath", version = "3.1.9")
bazel_dep(name = "libdeflate", version = "1.18")
+13 -8
View File
@@ -8,14 +8,19 @@
#pragma once
/// @TODO get the version from the header files.
/// due to the structure of the cmake configuration steps,
/// it's not obvious how to structure things for this to work.
/// so for now, just hardcode the version here.
//#include <OpenEXRCore/openexr_version.h>
#define OPENEXR_VERSION_MAJOR 3
#define OPENEXR_VERSION_MINOR 2
#define OPENEXR_VERSION_PATCH 0
//
// The OpenEXR release version is defined officially in
// src/lib/OpenEXRCore/openexr_version.h, but CMake doesn't readily allow
// that to be included here, so duplicate the settings for
// backwards-compatibility with applications that may expect to get the
// defines from this include.
//
#ifndef INCLUDED_OPENEXR_VERSION_H
#define OPENEXR_VERSION_MAJOR @OpenEXR_VERSION_MAJOR@
#define OPENEXR_VERSION_MINOR @OpenEXR_VERSION_MINOR@
#define OPENEXR_VERSION_PATCH @OpenEXR_VERSION_PATCH@
#endif
//
// Options / configuration based on O.S. / compiler
+1 -1
View File
@@ -228,7 +228,7 @@ option(OPENEXR_FORCE_INTERNAL_IMATH "Force using an internal imath" OFF)
# Check to see if Imath is installed outside of the current build directory.
set(OPENEXR_IMATH_REPO "https://github.com/AcademySoftwareFoundation/Imath.git" CACHE STRING
"Repo for auto-build of Imath")
set(OPENEXR_IMATH_TAG "main" CACHE STRING
set(OPENEXR_IMATH_TAG "v3.1.9" CACHE STRING
"Tag for auto-build of Imath (branch, tag, or SHA)")
if(NOT OPENEXR_FORCE_INTERNAL_IMATH)
#TODO: ^^ Release should not clone from main, this is a place holder
-6
View File
@@ -7,12 +7,6 @@ set_target_properties(exrinfo PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
# when building with an internal imath, this isn't generated until
# install time, so use the private header only include path
if (NOT TARGET Imath::ImathConfig)
target_include_directories(exrinfo PRIVATE ${IMATH_HEADER_ONLY_INCLUDE_DIRS})
endif()
if(OPENEXR_INSTALL_TOOLS)
install(TARGETS exrinfo DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
+3 -11
View File
@@ -99,19 +99,11 @@ openexr_define_library(OpenEXRCore
PRIVATE_DEPS
${OPENEXR_EXTRA_MATH_LIB}
DEPENDENCIES
Imath::Imath
)
target_link_libraries(OpenEXRCore PUBLIC Imath::Imath)
# when building with an internal imath, this isn't generated until
# install time, so need to use private header only include path (we
# aren't linking to imath or anything c++)
if (TARGET Imath::ImathConfig)
target_link_libraries(OpenEXRCore PRIVATE Imath::ImathConfig)
else()
target_include_directories(OpenEXRCore PRIVATE ${IMATH_HEADER_ONLY_INCLUDE_DIRS})
endif()
if (DEFINED EXR_DEFLATE_LIB)
if (BUILD_SHARED_LIBS)
target_link_libraries(OpenEXRCore PRIVATE ${EXR_DEFLATE_LIB})
+1
View File
@@ -5,6 +5,7 @@
#include "openexr_base.h"
#include "openexr_errors.h"
#include "openexr_version.h"
/**************************************/
+1 -1
View File
@@ -27,7 +27,7 @@ target_compile_definitions(OpenEXRCoreTest PRIVATE
COMP_MAJ=${OpenEXR_VERSION_MAJOR}
COMP_MIN=${OpenEXR_VERSION_MINOR}
COMP_PATCH=${OpenEXR_VERSION_PATCH}
COMP_EXTRA="\\"${OPENEXR_VERSION_RELEASE_TYPE}\\""
COMP_EXTRA="${OPENEXR_VERSION_RELEASE_TYPE}"
)
set_target_properties(OpenEXRCoreTest PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
+9 -9
View File
@@ -32,21 +32,21 @@ testBase (const std::string& tempdir)
exr_get_library_version (&major, &minor, &patch, &extra);
if (major != COMP_MAJ || minor != COMP_MIN || patch != COMP_PATCH ||
!strcmp (extra, compextra))
strcmp (extra, compextra))
{
std::cerr << "ERROR testing library, wrong library version: " << major
std::cerr << "ERROR testing library, wrong library version: '" << major
<< "." << minor << "." << patch;
if (extra[0] != '\0') std::cerr << "-" << extra;
std::cerr << " vs compiled in " << COMP_MAJ << "." << COMP_MIN << "."
if (extra[0] != '\0') std::cerr << extra;
std::cerr << "' vs compiled in '" << COMP_MAJ << "." << COMP_MIN << "."
<< COMP_PATCH;
if (compextra[0] != '\0') std::cerr << "-" << compextra;
std::cerr << std::endl;
if (compextra[0] != '\0') std::cerr << compextra;
std::cerr << "'" << std::endl;
EXRCORE_TEST (false);
}
std::cout << "Testing OpenEXR library version: " << major << "." << minor << "."
std::cout << "Testing OpenEXR library version: '" << major << "." << minor << "."
<< patch;
if (extra[0] != '\0') std::cout << "-" << extra;
std::cout << std::endl;
if (extra[0] != '\0') std::cout << extra;
std::cout << "'" << std::endl;
exr_get_library_version (NULL, &minor, &patch, &extra);
exr_get_library_version (&major, NULL, &patch, &extra);