Skip to content

Commit

Permalink
Update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
novomesk committed Feb 9, 2024
1 parent 8aa8282 commit 559846c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ find_package(Qt${QT_MAJOR_VERSION}Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
include(FindPkgConfig)
pkg_check_modules(LibJXL REQUIRED IMPORTED_TARGET libjxl>=0.7.0)
pkg_check_modules(LibJXLThreads REQUIRED IMPORTED_TARGET libjxl_threads>=0.7.0)
pkg_check_modules(LibJXLCMS IMPORTED_TARGET libjxl_cms>=0.9.0)

add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f02)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055900)
Expand Down
7 changes: 4 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
version: 0.5.1.{build}
version: 0.6.0.{build}
image: Visual Studio 2022
environment:
CC: cl.exe
CXX: cl.exe
install:
- cmd: >-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
git clone --depth 1 -b v0.9.x https://github.com/libjxl/libjxl.git --recursive --shallow-submodules
Expand All @@ -14,7 +15,7 @@ install:
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_TOOLS=OFF -DJPEGXL_ENABLE_DOXYGEN=OFF -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_SKCMS=ON -DJPEGXL_WARNINGS_AS_ERRORS=OFF -DJPEGXL_ENABLE_JPEGLI=OFF -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=OFF -DCMAKE_C_FLAGS="-DJXL_STATIC_DEFINE -DJXL_THREADS_STATIC_DEFINE" -DCMAKE_CXX_FLAGS="-DJXL_STATIC_DEFINE -DJXL_THREADS_STATIC_DEFINE" ..
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_TOOLS=OFF -DJPEGXL_ENABLE_DOXYGEN=OFF -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_SKCMS=ON -DJPEGXL_WARNINGS_AS_ERRORS=OFF -DJPEGXL_ENABLE_JPEGLI=OFF -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=OFF -DCMAKE_C_FLAGS="-DJXL_STATIC_DEFINE -DJXL_THREADS_STATIC_DEFINE -DJXL_CMS_STATIC_DEFINE" -DCMAKE_CXX_FLAGS="-DJXL_STATIC_DEFINE -DJXL_THREADS_STATIC_DEFINE -DJXL_CMS_STATIC_DEFINE" ..
ninja jxl jxl_cms jxl_threads hwy brotlicommon brotlidec brotlienc
Expand Down
4 changes: 2 additions & 2 deletions qt-jpegxl-image-plugin.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ OTHER_FILES = src/jpegxl.json

SOURCES += src/main.cpp

LIBS += -ljxl -ljxl_threads -lbrotlicommon -lbrotlienc -lbrotlidec
LIBS += -ljxl -ljxl_threads -ljxl_cms -lbrotlicommon -lbrotlienc -lbrotlidec

PLUGIN_TYPE = imageformats
PLUGIN_CLASS_NAME = QJpegXLPlugin
Expand All @@ -18,4 +18,4 @@ CONFIG -= separate_debug_info debug debug_and_release force_debug_info
QMAKE_TARGET_COMPANY = "Daniel Novomesky"
QMAKE_TARGET_PRODUCT = "qt-jpegxl-image-plugin"
QMAKE_TARGET_DESCRIPTION = "Qt plug-in to allow Qt and KDE based applications to read/write JPEG XL images."
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2020-2023 Daniel Novomesky"
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2020-2024 Daniel Novomesky"
2 changes: 1 addition & 1 deletion qt-jpegxl-image-plugin_appveyor.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ CONFIG -= separate_debug_info debug debug_and_release force_debug_info
QMAKE_TARGET_COMPANY = "Daniel Novomesky"
QMAKE_TARGET_PRODUCT = "qt-jpegxl-image-plugin"
QMAKE_TARGET_DESCRIPTION = "Qt plug-in to allow Qt and KDE based applications to read/write JPEG XL images."
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2020-2023 Daniel Novomesky"
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2020-2024 Daniel Novomesky"
4 changes: 2 additions & 2 deletions qtbuild_6.5.3/qt-jpegxl-image-plugin_alternative_appveyor.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ TEMPLATE = lib
CONFIG += release skip_target_version_ext c++14 warn_on plugin
CONFIG -= separate_debug_info debug debug_and_release force_debug_info

win32:VERSION = 0.5.0
win32:VERSION = 0.6.0
QMAKE_TARGET_COMPANY = "Daniel Novomesky"
QMAKE_TARGET_PRODUCT = "qt-jpegxl-image-plugin"
QMAKE_TARGET_DESCRIPTION = "Qt plug-in to allow Qt and KDE based applications to read/write JPEG XL images."
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2020-2023 Daniel Novomesky"
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2020-2024 Daniel Novomesky"
QMAKE_TARGET_COMMENTS = "Build using Qt 6.5.3"
7 changes: 7 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ endfunction()
if (LibJXL_FOUND AND LibJXLThreads_FOUND)
kimageformats_add_plugin("libqjpegxl${QT_MAJOR_VERSION}" SOURCES "main.cpp" "qjpegxlhandler.cpp")
target_link_libraries("libqjpegxl${QT_MAJOR_VERSION}" PkgConfig::LibJXL PkgConfig::LibJXLThreads)
if(LibJXL_VERSION VERSION_GREATER_EQUAL "0.9.0")
if(LibJXLCMS_FOUND)
target_link_libraries("libqjpegxl${QT_MAJOR_VERSION}" PkgConfig::LibJXLCMS)
else()
message(SEND_ERROR "libjxl_cms was not found!")
endif()
endif()
#install(FILES jxl.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR}/qimageioplugins/)
endif()

Expand Down

0 comments on commit 559846c

Please sign in to comment.