mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
51 lines
1.6 KiB
Diff
51 lines
1.6 KiB
Diff
From d25c4cff7621db614e5236a1646f5d76309ca73f Mon Sep 17 00:00:00 2001
|
|
From: Pavel Sountsov <siege@google.com>
|
|
Date: Thu, 16 Jun 2022 22:54:11 -0700
|
|
Subject: [PATCH] Add the example data copying target inside the main
|
|
CMakeLists.txt
|
|
|
|
This lets you build tests/demos with examples disabled.
|
|
---
|
|
CMakeLists.txt | 11 +++++++++++
|
|
examples/CMakeLists.txt | 5 -----
|
|
2 files changed, 11 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 6971b7d87..55fc0500c 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -1114,6 +1114,17 @@ if(WANT_TESTS)
|
|
add_subdirectory(tests)
|
|
endif(WANT_TESTS)
|
|
|
|
+#-----------------------------------------------------------------------------#
|
|
+#
|
|
+# Example data
|
|
+#
|
|
+#-----------------------------------------------------------------------------#
|
|
+
|
|
+copy_data_dir_to_build(copy_example_data
|
|
+ "${CMAKE_CURRENT_SOURCE_DIR}/examples/data"
|
|
+ "${CMAKE_CURRENT_BINARY_DIR}/examples/data"
|
|
+ )
|
|
+
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# contrib/Luajit
|
|
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
|
|
index 3d407cf29..6c7910969 100644
|
|
--- a/examples/CMakeLists.txt
|
|
+++ b/examples/CMakeLists.txt
|
|
@@ -273,11 +273,6 @@ endif()
|
|
# include_directories(/usr/include/OGRE)
|
|
# target_link_libraries(ex_ogre3d OgreMain)
|
|
|
|
-copy_data_dir_to_build(copy_example_data
|
|
- "${CMAKE_CURRENT_SOURCE_DIR}/data"
|
|
- "${CMAKE_CURRENT_BINARY_DIR}/data"
|
|
- )
|
|
-
|
|
# This is useful for developers to add temporary test programs.
|
|
include(${CMAKE_CURRENT_SOURCE_DIR}/local_examples.cmake OPTIONAL)
|
|
|