aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalanto <62221668+Salanto@users.noreply.github.com>2024-06-24 11:24:07 +0200
committerSalanto <62221668+Salanto@users.noreply.github.com>2024-06-24 11:24:07 +0200
commit9e8fc4313fdaebedb6a7768beeadbf4939c105bc (patch)
treeadc69b936870114e0991644e69aa301df907a930
parent0587f1ef1972c6b90a2e9c1dede5aaf794895b32 (diff)
Add build option for QtApng to CMake file
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6fabdcff..27881520 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
option(AO_BUILD_TESTS "Build test programs" ON)
option(AO_ENABLE_DISCORD_RPC "Enable Discord Rich Presence" ON)
+option(AO_BUILD_QTAPNG_IMAGEPLUGIN "Enable APNG Imageplugin" ON)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Network Widgets Concurrent WebSockets UiTools)
@@ -128,6 +129,17 @@ if(AO_BUILD_TESTS)
add_subdirectory(test)
endif()
+if (AO_BUILD_QTAPNG_IMAGEPLUGIN)
+ include(FetchContent)
+ FetchContent_Declare(
+ QtApng
+ GIT_REPOSITORY https://github.com/jurplel/QtApng.git
+ GIT_TAG master
+ SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/lib/QtApng
+ )
+ FetchContent_MakeAvailable(QtApng)
+endif()
+
set_target_properties(Attorney_Online PROPERTIES
LIBRARY_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_LIST_DIR}/bin>
RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_LIST_DIR}/bin>)