From ca1a94bb9ebfdec702652cb16a2b825e71c8d31f Mon Sep 17 00:00:00 2001 From: Boris Pek Date: Tue, 28 Mar 2017 18:10:38 +0300 Subject: [PATCH] qca: more tests --- src/qca-test.cmake | 22 ++++++++++++++++++++++ src/qca.mk | 7 +++++++ 2 files changed, 29 insertions(+) create mode 100644 src/qca-test.cmake diff --git a/src/qca-test.cmake b/src/qca-test.cmake new file mode 100644 index 00000000..05b95667 --- /dev/null +++ b/src/qca-test.cmake @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +# partial module - included by src/cmake/CMakeLists.txt + +set(TGT test-${PKG}-cmake) + +enable_language(CXX) +add_executable(${TGT} ${CMAKE_CURRENT_LIST_DIR}/${PKG}-test.cpp) + +find_package(Qt5Core REQUIRED) +find_package(Qca-qt5 REQUIRED) + +include_directories (${Qt5Core_INCLUDE_DIRS}) +target_link_libraries(${TGT} Qt5::Core qca-qt5) + +# Statically link QCA plugins when necessary +if(BUILD_STATIC_LIBS) + target_link_libraries(${TGT} qca-ossl) +endif(BUILD_STATIC_LIBS) + +install(TARGETS ${TGT} DESTINATION bin) + diff --git a/src/qca.mk b/src/qca.mk index fbb1269e..65b8bc7b 100644 --- a/src/qca.mk +++ b/src/qca.mk @@ -26,6 +26,13 @@ define $(PKG)_BUILD $(MAKE) -C '$(BUILD_DIR)/test-qca' -j $(JOBS) $(BUILD_TYPE) $(INSTALL) -m755 '$(BUILD_DIR)/test-qca/$(BUILD_TYPE)/test-qca-qmake.exe' '$(PREFIX)/$(TARGET)/bin/' + # build test as cmake project + mkdir '$(1).test-cmake' + cd '$(1).test-cmake' && $(TARGET)-cmake \ + -DPKG=$(PKG) \ + '$(PWD)/src/cmake/test' + $(MAKE) -C '$(1).test-cmake' -j 1 install VERBOSE=ON + # build test manually '$(TARGET)-g++' \ -W -Wall -Werror -std=gnu++11 \