mirror of https://git.wownero.com/dsc/mxe.git
qtbase: add cmake test
This commit is contained in:
parent
a73ac718e0
commit
2a6658cd92
|
@ -0,0 +1,19 @@
|
|||
# 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)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
find_package(Qt5 ${PKG_VERSION} EXACT REQUIRED COMPONENTS Widgets)
|
||||
|
||||
add_executable(${TGT} ${CMAKE_CURRENT_LIST_DIR}/qt-test.cpp)
|
||||
|
||||
target_link_libraries(${TGT} Qt5::Widgets)
|
||||
|
||||
install(TARGETS ${TGT} DESTINATION bin)
|
|
@ -96,8 +96,9 @@ define $(PKG)_BUILD
|
|||
-I'$(1)/test-$(PKG)-pkgconfig' \
|
||||
`'$(TARGET)-pkg-config' Qt5Widgets$(BUILD_TYPE_SUFFIX) --cflags --libs`
|
||||
|
||||
# setup cmake toolchain
|
||||
# setup cmake toolchain and test
|
||||
echo 'set(CMAKE_SYSTEM_PREFIX_PATH "$(PREFIX)/$(TARGET)/qt5" ${CMAKE_SYSTEM_PREFIX_PATH})' > '$(CMAKE_TOOLCHAIN_DIR)/$(PKG).cmake'
|
||||
$(CMAKE_TEST)
|
||||
|
||||
# batch file to run test programs
|
||||
(printf 'set PATH=..\\lib;..\\qt5\\bin;..\\qt5\\lib;%%PATH%%\r\n'; \
|
||||
|
|
Loading…
Reference in New Issue