mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 14:43:27 -04:00
Upstream now uses CRLF for line endings, so lots of updates. Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
76 lines
2.7 KiB
Diff
76 lines
2.7 KiB
Diff
From fcb6085c5f57f7d63f3caa494043520b1589832e Mon Sep 17 00:00:00 2001
|
|
From: Alexander Golubev <fatzer2@gmail.com>
|
|
Date: Mon, 11 Nov 2024 19:04:44 +0300
|
|
Subject: [PATCH 1/3] Make building of tests optional
|
|
|
|
---
|
|
CMakeLists.txt | 13 +++++++++++--
|
|
UnitTests/CMakeLists.txt | 2 ++
|
|
2 files changed, 13 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index b4f95e3..6d5f8b6 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -47,6 +47,7 @@ if(WIN32 AND MSVC)
|
|
endif()
|
|
|
|
option(PDF4QT_BUILD_ONLY_CORE_LIBRARY "Build only core library" OFF)
|
|
+option(PDF4QT_BUILD_TESTS "Build UnitTests" ON)
|
|
|
|
set(PDF4QT_QT_ROOT "" CACHE PATH "Qt root directory")
|
|
|
|
@@ -64,7 +65,11 @@ find_package(Qt6 REQUIRED COMPONENTS Core LinguistTools)
|
|
if(PDF4QT_BUILD_ONLY_CORE_LIBRARY)
|
|
find_package(Qt6 REQUIRED COMPONENTS Core Gui Svg Xml)
|
|
else()
|
|
- find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Svg Xml PrintSupport TextToSpeech Test Concurrent)
|
|
+ find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Svg Xml PrintSupport TextToSpeech Concurrent)
|
|
+endif()
|
|
+
|
|
+if(PDF4QT_BUILD_TESTS)
|
|
+ find_package(Qt6 REQUIRED COMPONENTS Test)
|
|
endif()
|
|
|
|
qt_standard_project_setup(I18N_TRANSLATED_LANGUAGES en de cs es ko zh_CN zh_TW fr tr ru)
|
|
@@ -160,7 +165,6 @@ if(NOT PDF4QT_BUILD_ONLY_CORE_LIBRARY)
|
|
add_subdirectory(JBIG2_Viewer)
|
|
add_subdirectory(PdfExampleGenerator)
|
|
add_subdirectory(PdfTool)
|
|
- add_subdirectory(UnitTests)
|
|
add_subdirectory(Pdf4QtLibGui)
|
|
add_subdirectory(Pdf4QtEditorPlugins)
|
|
add_subdirectory(Pdf4QtEditor)
|
|
@@ -171,6 +175,11 @@ if(NOT PDF4QT_BUILD_ONLY_CORE_LIBRARY)
|
|
add_subdirectory(WixInstaller)
|
|
endif()
|
|
|
|
+if(PDF4QT_BUILD_TESTS)
|
|
+ enable_testing()
|
|
+ add_subdirectory(UnitTests)
|
|
+endif()
|
|
+
|
|
qt_collect_translation_source_targets(i18n_targets)
|
|
message("CMAKE_TRANSLATION_TARGETS = " ${i18n_targets})
|
|
|
|
diff --git a/UnitTests/CMakeLists.txt b/UnitTests/CMakeLists.txt
|
|
index 34d18df..788d924 100644
|
|
--- a/UnitTests/CMakeLists.txt
|
|
+++ b/UnitTests/CMakeLists.txt
|
|
@@ -32,6 +32,7 @@ set_target_properties(UnitTests PROPERTIES
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PDF4QT_INSTALL_LIB_DIR}
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PDF4QT_INSTALL_BIN_DIR}
|
|
)
|
|
+add_test(UnitTests "${CMAKE_BINARY_DIR}/${PDF4QT_INSTALL_BIN_DIR}/UnitTests")
|
|
|
|
add_executable(UnitTestsImageOptimizer
|
|
tst_imageoptimizertest.cpp
|
|
@@ -45,3 +46,4 @@ set_target_properties(UnitTestsImageOptimizer PROPERTIES
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PDF4QT_INSTALL_LIB_DIR}
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PDF4QT_INSTALL_BIN_DIR}
|
|
)
|
|
+add_test(UnitTestsImageOptimizer "${CMAKE_BINARY_DIR}/${PDF4QT_INSTALL_BIN_DIR}/UnitTestsImageOptimizer")
|
|
--
|
|
2.53.0
|
|
|