summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/macosFW/src
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-12-06 13:06:24 (GMT)
committerBrad King <brad.king@kitware.com>2017-12-07 14:05:58 (GMT)
commite4ccc68429d6a187f7e09d560a81e3b36cd06328 (patch)
tree2911dfa2fe5448132e545cf5e096fcef91e9d8bc /Tests/QtAutogen/macosFW/src
parentfcbd02fd6ec56a6a4540e70082e899b45934dab8 (diff)
downloadCMake-e4ccc68429d6a187f7e09d560a81e3b36cd06328.zip
CMake-e4ccc68429d6a187f7e09d560a81e3b36cd06328.tar.gz
CMake-e4ccc68429d6a187f7e09d560a81e3b36cd06328.tar.bz2
Autogen: Tests: Add test for MacOS frameworks
Diffstat (limited to 'Tests/QtAutogen/macosFW/src')
-rw-r--r--Tests/QtAutogen/macosFW/src/CMakeLists.txt33
-rw-r--r--Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp17
-rw-r--r--Tests/QtAutogen/macosFW/src/macos_fw_lib.h18
3 files changed, 68 insertions, 0 deletions
diff --git a/Tests/QtAutogen/macosFW/src/CMakeLists.txt b/Tests/QtAutogen/macosFW/src/CMakeLists.txt
new file mode 100644
index 0000000..a02be00
--- /dev/null
+++ b/Tests/QtAutogen/macosFW/src/CMakeLists.txt
@@ -0,0 +1,33 @@
+set(MACOS_FW_LIB_VERSION "0.1")
+set(MACOS_FW_LIB_SRCS
+ macos_fw_lib.cpp
+)
+set(MACOS_FW_LIB_HDRS
+ macos_fw_lib.h
+)
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${Qt5Core_INCLUDE_DIRS}
+)
+
+add_library(macos_fw_lib SHARED
+ ${MACOS_FW_LIB_SRCS}
+ ${MACOS_FW_LIB_HDRS}
+)
+set_target_properties(macos_fw_lib PROPERTIES AUTOMOC TRUE)
+set_target_properties(macos_fw_lib PROPERTIES
+ CLEAN_DIRECT_OUTPUT 1
+ FRAMEWORK 1
+ FRAMEWORK_VERSION ${MACOS_FW_LIB_VERSION}
+ VERSION ${MACOS_FW_LIB_VERSION}
+ SOVERSION ${MACOS_FW_LIB_VERSION}
+ MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${MACOS_FW_LIB_VERSION}
+ MACOSX_FRAMEWORK_IDENTIFIER org.macos.fw_lib
+ POSITION_INDEPENDENT_CODE ON
+ PUBLIC_HEADER "${MACOS_FW_LIB_HDRS}"
+)
+target_link_libraries(macos_fw_lib
+ Qt5::Core
+)
diff --git a/Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp b/Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp
new file mode 100644
index 0000000..881a8c9
--- /dev/null
+++ b/Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp
@@ -0,0 +1,17 @@
+#include "macos_fw_lib.h"
+
+#include <QString>
+#include <QtGlobal>
+
+MacosFWLib::MacosFWLib()
+{
+}
+
+MacosFWLib::~MacosFWLib()
+{
+}
+
+QString MacosFWLib::qtVersionString() const
+{
+ return QString(qVersion());
+}
diff --git a/Tests/QtAutogen/macosFW/src/macos_fw_lib.h b/Tests/QtAutogen/macosFW/src/macos_fw_lib.h
new file mode 100644
index 0000000..e66e0ea
--- /dev/null
+++ b/Tests/QtAutogen/macosFW/src/macos_fw_lib.h
@@ -0,0 +1,18 @@
+#ifndef MACOSFWLIB_H
+#define MACOSFWLIB_H
+
+#include <QObject>
+#include <QString>
+
+class __attribute__((visibility("default"))) MacosFWLib : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit MacosFWLib();
+ ~MacosFWLib();
+
+ QString qtVersionString() const;
+};
+
+#endif // MACOSFWLIB_H