aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/fltk/fltk/0004-Fix-build-error-when-enable-package-config-examples.patch
blob: 974c02fe619c9b5bfb4a27071ba4e007ae4baa83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
Fix build error when enable package config examples.

Upstream-Status: Backport [https://github.com/fltk/fltk/commit/16774dd]

Signed-off-by: Kai Kang <kai.kang@windriver.com>


From 16774ddc4e000c89e560fde0ced8be9814ef041e Mon Sep 17 00:00:00 2001
From: Albrecht Schlosser <albrechts.fltk@online.de>
Date: Wed, 8 Feb 2017 02:06:52 +0000
Subject: [PATCH] Rename test/help demo program to test/help_dialog.

This change avoids a name conflict with CMake's auto-generated target 'help'
for "Unix Makefiles", "Ninja", and supposedly other generators as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12171 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
---
 CMake/macros.cmake                        |  5 -----
 documentation/src/examples.dox            |  8 +++----
 test/CMakeLists.txt                       | 27 +++++++++++++++++++----
 test/demo.menu                            |  2 +-
 test/{help.cxx => help_dialog.cxx}        |  6 ++---
 test/{help-test.html => help_dialog.html} |  0
 6 files changed, 31 insertions(+), 17 deletions(-)
 rename test/{help.cxx => help_dialog.cxx} (88%)
 rename test/{help-test.html => help_dialog.html} (100%)

diff --git a/CMake/macros.cmake b/CMake/macros.cmake
index 5b0d0fa..7134fcb 100644
--- a/CMake/macros.cmake
+++ b/CMake/macros.cmake
@@ -90,11 +90,6 @@ function(CREATE_EXAMPLE NAME SOURCES LIBRARIES)
 
     set (tname ${NAME})		# target name
 
-    # rename reserved target name "help" (CMake 2.8.12 and later)
-    if (${tname} MATCHES "^help$")
-        set (tname "test_help")
-    endif (${tname} MATCHES "^help$")
-
     foreach(src ${SOURCES})
         if ("${src}" MATCHES "\\.fl$")
             list(APPEND flsrcs ${src})
diff --git a/documentation/src/examples.dox b/documentation/src/examples.dox
index 5105b7b..7961b02 100644
--- a/documentation/src/examples.dox
+++ b/documentation/src/examples.dox
@@ -60,7 +60,7 @@ you build FLTK, unlike those in the 'test' directory shown below.
 </tr>
 <tr>
 <td> \ref examples_hello           </td>
-<td> \ref examples_help            </td>
+<td> \ref examples_help_dialog     </td>
 <td> \ref examples_iconize         </td>
 <td> \ref examples_image           </td>
 <td> \ref examples_inactive        </td>
@@ -326,13 +326,13 @@ easily under FLTK.
 tiny demo shows how little is needed to get a functioning application
 running with FLTK. Quite impressive, I'd say.
 
-\subsection examples_help help
+\subsection examples_help_dialog help_dialog
 
 \par
-\c help displays the built-in FLTK help browser. The 
+\c help_dialog displays the built-in FLTK help browser. The
 Fl_Help_Dialog understands a subset of html and renders
 various image formats. This widget makes it easy to provide help
-pages to the user without depending on the operating system's 
+pages to the user without depending on the operating system's
 html browser.
 
 \subsection examples_iconize iconize
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 22ec9ab..4caffa5 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,3 +1,22 @@
+#
+# "$Id$"
+#
+# CMakeLists.txt used to build test and demo apps by the CMake build system
+#
+# Copyright 2004-2017 by Bill Spitzak and others.
+#
+# This library is free software. Distribution and use rights are outlined in
+# the file "COPYING" which should have been included with this file.  If this
+# file is missing or damaged, see the license at:
+#
+#     http://www.fltk.org/COPYING.php
+#
+# Please report all bugs and problems on the following page:
+#
+#     http://www.fltk.org/str.php
+#
+#######################################################################
+
 set(EXECUTABLE_OUTPUT_PATH ${FLTK_BINARY_DIR}/bin/examples)
 
 #######################################################################
@@ -64,7 +83,7 @@ CREATE_EXAMPLE(file_chooser file_chooser.cxx "fltk;fltk_images")
 CREATE_EXAMPLE(fonts fonts.cxx fltk)
 CREATE_EXAMPLE(forms forms.cxx "fltk;fltk_forms")
 CREATE_EXAMPLE(hello hello.cxx fltk)
-CREATE_EXAMPLE(help help.cxx "fltk;fltk_images")
+CREATE_EXAMPLE(help_dialog help_dialog.cxx "fltk;fltk_images")
 CREATE_EXAMPLE(icon icon.cxx fltk)
 CREATE_EXAMPLE(iconize iconize.cxx fltk)
 CREATE_EXAMPLE(image image.cxx fltk)
@@ -134,7 +153,7 @@ endif(FLTK_HAVE_CAIRO)
 # Note: this is incomplete as of 11 Feb 2015
 # Todo: currently all files are copied, but some of them need configuration:
 # - demo.menu: fluid can't be started (wrong path)
-# - demo.menu: help (help-test.html) can't find its images (not copied)
+# - demo.menu: help_dialog (help_dialog.html) can't find its images (not copied)
 # - maybe more ...
 
 # prepare for a "better" test file installation path
@@ -149,11 +168,11 @@ configure_file(demo.menu ${TESTFILE_PATH}/demo.menu COPYONLY)
 
 # use target directory only to avoid redundancy
 configure_file(rgb.txt ${TESTFILE_PATH} COPYONLY)
-configure_file(help-test.html ${TESTFILE_PATH} COPYONLY)
+configure_file(help_dialog.html ${TESTFILE_PATH} COPYONLY)
 configure_file(browser.cxx ${TESTFILE_PATH} COPYONLY)
 configure_file(editor.cxx ${TESTFILE_PATH} COPYONLY)
 if(APPLE AND NOT OPTION_APPLE_X11)
     configure_file(browser.cxx "${TESTFILE_PATH}/browser.app/Contents/Resources/browser.cxx" COPYONLY)
     configure_file(rgb.txt ${TESTFILE_PATH}/colbrowser.app/Contents/Resources/rgb.txt COPYONLY)
-    configure_file(help-test.html ${TESTFILE_PATH}/help.app/Contents/Resources/help-test.html COPYONLY)
+    configure_file(help_dialog.html ${TESTFILE_PATH}/help_dialog.app/Contents/Resources/help_dialog.html COPYONLY)
 endif(APPLE AND NOT OPTION_APPLE_X11)
diff --git a/test/demo.menu b/test/demo.menu
index 337a71c..97e522a 100644
--- a/test/demo.menu
+++ b/test/demo.menu
@@ -77,7 +77,7 @@
 	@o:Font Tests...:@of
 		@of:Fonts:fonts
 		@of:UTF-8:utf8
-	@o:HelpDialog:help
+	@o:HelpDialog:help_dialog
 	@o:Input Choice:input_choice
 	@o:Preferences:preferences
 	@o:Threading:threads
diff --git a/test/help.cxx b/test/help_dialog.cxx
similarity index 88%
rename from test/help.cxx
rename to test/help_dialog.cxx
index f5c51d6..7866641 100644
--- a/test/help.cxx
+++ b/test/help_dialog.cxx
@@ -3,7 +3,7 @@
 //
 // Fl_Help_Dialog test program.
 //
-// Copyright 1999-2010 by Easy Software Products.
+// Copyright 2011-2017 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -46,13 +46,13 @@ main(int  argc,			// I - Number of command-line arguments
     strcpy(buf, argv[0]);
     char *slash = strrchr(buf, '/');
     if (slash)
-      strcpy(slash, "/../Resources/help-test.html");
+      strcpy(slash, "/../Resources/help_dialog.html");
     help->load(buf);
   
 #else
   
   if (argc <= 1)
-    help->load("help-test.html");
+    help->load("help_dialog.html");
   else
     help->load(argv[1]);
   
diff --git a/test/help-test.html b/test/help_dialog.html
similarity index 100%
rename from test/help-test.html
rename to test/help_dialog.html