summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Sessler <bernhard.sessler@corscience.de>2014-01-08 15:56:23 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-11 16:04:56 +0000
commit3a04e47dc8571c3d6f69c8b75a9d58f2004dc0c5 (patch)
tree727ed781380c09da08945cbc68cf9155b7a3da96
parent44ec3e03cba21acfbb44a975533547803c83ea97 (diff)
downloadcppunit-3a04e47dc8571c3d6f69c8b75a9d58f2004dc0c5.tar.gz
examples/hierarchy: Build hierarchy example
When CPPUNIT_BUILD_EXAMPLES is ON, the hierarchy example will now be built with CMake. Change-Id: I1c706c09dbdd450abadf77536ee7a6157bf36612 Signed-off-by: Bernhard Sessler <bernhard.sessler@corscience.de> Reviewed-on: https://gerrit.libreoffice.org/7317 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--examples/CMakeLists.txt1
-rw-r--r--examples/hierarchy/CMakeLists.txt14
2 files changed, 15 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 72fa78c..4cdd84a 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,4 +1,5 @@
add_subdirectory(cppunittest)
+add_subdirectory(hierarchy)
add_subdirectory(DumperPlugIn)
if(CPPUNIT_BUILD_QT_TESTRUNNER)
diff --git a/examples/hierarchy/CMakeLists.txt b/examples/hierarchy/CMakeLists.txt
new file mode 100644
index 0000000..b6fbd44
--- /dev/null
+++ b/examples/hierarchy/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Common source files
+set(cppunit-hierarchy-example-SOURCES
+ BoardGame.cpp
+ Chess.cpp
+ main.cpp
+)
+
+# Create the test executable
+add_executable(cppunit-hierarchy-example ${cppunit-hierarchy-example-SOURCES})
+target_link_libraries(cppunit-hierarchy-example cppunit)
+
+# Create install target
+install(TARGETS cppunit-hierarchy-example
+ DESTINATION share/${CPPUNIT_VERSION}/examples COMPONENT examples)