summaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-23 01:53:24 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-23 01:53:24 +0200
commitf357f4311c6faedcb87f40144b83e2219538386c (patch)
treee5fd4b1c3a16407d5f53ef467ae997547235e6a9 /test/CMakeLists.txt
parent0015e64671a3c96a3600c23fa62935f981f78a1e (diff)
Use local images in test/help_dialog(.html)
- create subdir test/images - copy images used by test/help_dialog to this subdir - fix image URL's in test/help_dialog.html accordingly CMake: copy the entire test/images folder to the <build>/data folder This enables the demo test/help_dialog.cxx to find its images.
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt30
1 files changed, 18 insertions, 12 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index d7ad60750..c1a98617b 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -15,11 +15,16 @@
#
#######################################################################
+include (../CMake/FLTK-Functions.cmake)
+include (../CMake/fl_create_example.cmake)
+
set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/../bin)
set (TESTFILE_PATH ${CMAKE_CURRENT_BINARY_DIR}/../data)
-include (../CMake/FLTK-Functions.cmake)
-include (../CMake/fl_create_example.cmake)
+# create data and binary directory to copy scripts and data files
+
+file (MAKE_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
+file (MAKE_DIRECTORY ${TESTFILE_PATH})
#######################################################################
# audio libs for test apps
@@ -202,17 +207,11 @@ endif (OPTION_BUILD_SHARED_LIBS)
endif (NOT ANDROID)
-# We need some support files for the demo programs:
-
-# Note: this is incomplete as of July 2020
-# Todo: currently all files are copied, but some of them may need configuration:
-# - demo.menu: help_dialog (help_dialog.html) can't find its images (not copied)
+#####################################################
+# We need some support files for the demo programs
+#####################################################
-# create data directory for test and demo programs if it doesn't exist
-
-file (MAKE_DIRECTORY ${TESTFILE_PATH})
-
-# copy the test files
+# copy the required test files
file (COPY
demo.menu rgb.txt browser.cxx editor.cxx valuators.fl
@@ -220,6 +219,13 @@ file (COPY
DESTINATION ${TESTFILE_PATH}
)
+# copy the image directory for help_dialog.html
+
+file (COPY
+ ${CMAKE_CURRENT_SOURCE_DIR}/images
+ DESTINATION ${TESTFILE_PATH}
+)
+
# the main test program 'demo' needs additional hints and configurations
target_compile_definitions (demo PRIVATE GENERATED_BY_CMAKE)