Files
Jungfraujoch/preview/CMakeLists.txt
T
leonarski_f 75e401f0e5
Build Packages / Unit tests (push) Successful in 1h31m59s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 8m43s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 10m5s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 9m27s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m56s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 9m24s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 10m27s
Build Packages / build:rpm (rocky8) (push) Successful in 9m20s
Build Packages / build:rpm (rocky9) (push) Successful in 10m50s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m54s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 8m38s
Build Packages / DIALS test (push) Successful in 12m13s
Build Packages / XDS test (durin plugin) (push) Successful in 7m8s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m8s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m50s
Build Packages / Generate python client (push) Successful in 16s
Build Packages / Build documentation (push) Successful in 50s
Build Packages / Create release (push) Skipped
v1.0.0-rc.153 (#63)
This is an UNSTABLE release. It includes many experimental features, as well as many AI generated fixes. We recommend using rc.152 for production use.

* jfjoch_broker: Add EXPERIMENTAL pixelrefine mode for image processing
* jfjoch_broker: Allow to load user mask from 8-bit and 16-bit TIFF files
* jfjoch_broker: Add ROI calculation in non-FPGA workflow
* jfjoch_broker: Fixes to TCP image pusher
* jfjoch_broker: Remove NUMA bindings
* jfjoch_broker: Improvements to indexing
* jfjoch_broker: For PSI EIGER, trimming energies are taken from the detector configuration (now compulsory) instead of hardcoded values
* jfjoch_writer: Save ROI definitions and the per-pixel ROI bitmap in the master file; azimuthal ROIs support phi (angular) sectors
* jfjoch_viewer: Major redesign with dockable panels and saved layouts, plus on-canvas creation/move/resize of box, circle and azimuthal ROIs
* jfjoch_viewer: Run jfjoch_process reprocessing jobs from inside the GUI and overlay per-run results

Reviewed-on: #63
2026-06-23 20:29:49 +02:00

65 lines
2.6 KiB
CMake

include(ExternalProject)
find_package(ZLIB REQUIRED)
# libjpeg-turbo: upstream does NOT support add_subdirectory/FetchContent inclusion, so build and
# install it out-of-line and import the static lib. (Adapted from aseprite's FindJpegTurbo.cmake.)
# The static lib is `jpeg-static.lib` on MSVC and `libjpeg.a` elsewhere.
IF (MSVC)
SET(LIBJPEG_TURBO_STATIC_SUFFIX "-static")
ELSE()
SET(LIBJPEG_TURBO_STATIC_SUFFIX "")
ENDIF()
SET(LIBJPEG_TURBO_DIR "${CMAKE_CURRENT_BINARY_DIR}/libjpeg-turbo")
SET(LIBJPEG_TURBO_LIBRARY "${LIBJPEG_TURBO_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}jpeg${LIBJPEG_TURBO_STATIC_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
SET(LIBJPEG_TURBO_INCLUDE_DIRS "${LIBJPEG_TURBO_DIR}/include")
ExternalProject_Add(libjpeg-turbo-project
GIT_REPOSITORY https://github.com/libjpeg-turbo/libjpeg-turbo
GIT_TAG 3.0.4
PREFIX "${LIBJPEG_TURBO_DIR}"
INSTALL_DIR "${LIBJPEG_TURBO_DIR}"
BUILD_BYPRODUCTS "${LIBJPEG_TURBO_LIBRARY}"
CMAKE_CACHE_ARGS
-DENABLE_SHARED:BOOL=OFF
-DENABLE_STATIC:BOOL=ON
-DWITH_ARITH_DEC:BOOL=ON
-DWITH_ARITH_ENC:BOOL=ON
-DWITH_JPEG8:BOOL=OFF
-DWITH_JPEG7:BOOL=OFF
-DWITH_TURBOJPEG:BOOL=OFF
# Lazy SIMD: use NASM-accelerated SIMD when nasm is present, otherwise warn and build a
# scalar libjpeg (REQUIRE_SIMD=OFF is libjpeg-turbo's default; pinned here to be explicit).
-DWITH_SIMD:BOOL=ON
-DREQUIRE_SIMD:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DCMAKE_INSTALL_LIBDIR:PATH=<INSTALL_DIR>/lib)
# Create the include dir up front so setting INTERFACE_INCLUDE_DIRECTORIES below does not fail.
FILE(MAKE_DIRECTORY ${LIBJPEG_TURBO_INCLUDE_DIRS})
ADD_LIBRARY(JPEG::JPEG STATIC IMPORTED GLOBAL)
SET_TARGET_PROPERTIES(JPEG::JPEG PROPERTIES
IMPORTED_LOCATION "${LIBJPEG_TURBO_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBJPEG_TURBO_INCLUDE_DIRS}")
ADD_LIBRARY(JFJochPreview STATIC
JFJochTIFF.cpp JFJochTIFF.h
JFJochJPEG.cpp JFJochJPEG.h
PreviewCounter.cpp PreviewCounter.h
PreviewImage.cpp PreviewImage.h
ZMQPreviewSocket.cpp
ZMQPreviewSocket.h
ZMQMetadataSocket.cpp
ZMQMetadataSocket.h
)
# JPEG::JPEG is an IMPORTED target, so the build-order dependency on the ExternalProject must be
# attached to the consuming target instead.
ADD_DEPENDENCIES(JFJochPreview libjpeg-turbo-project)
TARGET_LINK_LIBRARIES(JFJochPreview PUBLIC JFJochZMQ JFJochCommon CBORStream2FrameSerialize)
TARGET_LINK_LIBRARIES(JFJochPreview PUBLIC JPEG::JPEG tiff tiffxx ZLIB::ZLIB)