summaryrefslogtreecommitdiffstats
path: root/Tests/VSResource
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/VSResource')
-rw-r--r--Tests/VSResource/CMakeLists.txt4
-rw-r--r--Tests/VSResource/main.cpp10
-rw-r--r--Tests/VSResource/test.rc5
-rw-r--r--Tests/VSResource/test.txt1
4 files changed, 20 insertions, 0 deletions
diff --git a/Tests/VSResource/CMakeLists.txt b/Tests/VSResource/CMakeLists.txt
new file mode 100644
index 0000000..8a71bd0
--- /dev/null
+++ b/Tests/VSResource/CMakeLists.txt
@@ -0,0 +1,4 @@
+cmake_minimum_required (VERSION 2.6)
+project (VSResource)
+add_definitions(/DCMAKE_RCDEFINE="test.txt")
+add_executable(VSResource main.cpp test.rc)
diff --git a/Tests/VSResource/main.cpp b/Tests/VSResource/main.cpp
new file mode 100644
index 0000000..6f68df3
--- /dev/null
+++ b/Tests/VSResource/main.cpp
@@ -0,0 +1,10 @@
+#include <windows.h>
+
+int main(int argc, char** argv) {
+ HRSRC hello = ::FindResource(0, "hello", "TEXT");
+ if(hello) {
+ return 0;
+ } else {
+ return 1;
+ }
+}
diff --git a/Tests/VSResource/test.rc b/Tests/VSResource/test.rc
new file mode 100644
index 0000000..8aab8b7
--- /dev/null
+++ b/Tests/VSResource/test.rc
@@ -0,0 +1,5 @@
+#ifdef CMAKE_RCDEFINE
+hello TEXT DISCARDABLE CMAKE_RCDEFINE
+#else
+#error "resource compiler did not get defines from command line!"
+#endif \ No newline at end of file
diff --git a/Tests/VSResource/test.txt b/Tests/VSResource/test.txt
new file mode 100644
index 0000000..980a0d5
--- /dev/null
+++ b/Tests/VSResource/test.txt
@@ -0,0 +1 @@
+Hello World!