summaryrefslogtreecommitdiffstats
path: root/src/qt-test.cmake
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2015-10-04 07:39:06 (GMT)
committerTony Theodore <tonyt@logyst.com>2015-10-04 07:39:06 (GMT)
commitdd34bab1b47e929b7becb5f1fd9cee9696cef44b (patch)
treec8e7b6a381066fb1f3f5bc43cad397bb9e5c977a /src/qt-test.cmake
parentdb8bd3763aa422d62de8e4d5e2d97cf3d90f2e79 (diff)
downloadmxe-dd34bab1b47e929b7becb5f1fd9cee9696cef44b.zip
mxe-dd34bab1b47e929b7becb5f1fd9cee9696cef44b.tar.gz
mxe-dd34bab1b47e929b7becb5f1fd9cee9696cef44b.tar.bz2
qt: add cmake test
workaround in #857 allows this to build. see also #852, a complete solution that covers Qt5 is required
Diffstat (limited to 'src/qt-test.cmake')
-rw-r--r--src/qt-test.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/qt-test.cmake b/src/qt-test.cmake
new file mode 100644
index 0000000..064214c
--- /dev/null
+++ b/src/qt-test.cmake
@@ -0,0 +1,21 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+# partial module - included by src/cmake/CMakeLists.txt
+
+set(TGT test-${PKG}-cmake)
+
+enable_language(CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+find_package(Qt4 ${PKG_VERSION} EXACT REQUIRED)
+include(${QT_USE_FILE})
+
+add_executable(${TGT} WIN32 ${CMAKE_CURRENT_LIST_DIR}/${PKG}-test.cpp)
+target_link_libraries(${TGT} ${QT_LIBRARIES})
+
+install(TARGETS ${TGT} DESTINATION bin)