Merge pull request #2163 from sibuserv/update-qtkeychain

qtkeychain: add patch + disable extra build of test application
This commit is contained in:
mabrand 2018-06-29 11:09:12 +02:00 committed by GitHub
commit 1a907791da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,39 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Pek <tehnick-8@yandex.ru>
Date: Fri, 28 Jun 2018 01:43:09 +0300
Subject: [PATCH 1/1] Make build of test application optional
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1111111..2222222 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,9 +18,11 @@ include(ECMSetupVersion)
include(ECMGeneratePriFile)
option(BUILD_WITH_QT4 "Build qtkeychain with Qt4 no matter if Qt5 was found" OFF)
+option(BUILD_TEST_APPLICATION "Build test application" ON)
option(BUILD_TRANSLATIONS "Build translations" ON)
option(QTKEYCHAIN_STATIC "Build static library" OFF)
+
if(CMAKE_SYSTEM_NAME STREQUAL Android)
set(ANDROID 1)
endif()
@@ -224,8 +226,10 @@ install(TARGETS ${QTKEYCHAIN_TARGET_NAME}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-add_executable( testclient testclient.cpp )
-target_link_libraries( testclient ${QTKEYCHAIN_TARGET_NAME})
+if(BUILD_TEST_APPLICATION)
+ add_executable( testclient testclient.cpp )
+ target_link_libraries( testclient ${QTKEYCHAIN_TARGET_NAME})
+endif()
###

View File

@ -11,7 +11,8 @@ $(PKG)_DEPS := cc qttools
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
-DQTKEYCHAIN_STATIC=$(CMAKE_STATIC_BOOL)
-DQTKEYCHAIN_STATIC=$(CMAKE_STATIC_BOOL) \
-DBUILD_TEST_APPLICATION="OFF"
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install