diff tests/src/libirccd/dynlib-plugin/CMakeLists.txt @ 611:9fbd1700435b

Tests: reoganize hierarchy
author David Demelier <markand@malikania.fr>
date Fri, 15 Dec 2017 15:37:58 +0100
parents tests/src/dynlib-plugin/CMakeLists.txt@a51b5dd5b761
children 27587ff92a64
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/src/libirccd/dynlib-plugin/CMakeLists.txt	Fri Dec 15 15:37:58 2017 +0100
@@ -0,0 +1,43 @@
+#
+# CMakeLists.txt -- CMake build system for irccd
+#
+# Copyright (c) 2013-2017 David Demelier <markand@malikania.fr>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+find_package(Boost REQUIRED QUIET)
+
+add_library(test-plugin MODULE test_plugin.cpp)
+target_link_libraries(test-plugin libirccd Boost::boost)
+set_target_properties(
+    test-plugin
+    PROPERTIES
+        PREFIX ""
+        RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+foreach (c ${CMAKE_CONFIGURATION_TYPES})
+    string(TOUPPER ${c} c)
+    set_target_properties(
+        test-plugin
+        PROPERTIES
+            RUNTIME_OUTPUT_DIRECTORY_${c} ${CMAKE_CURRENT_BINARY_DIR}
+    )
+endforeach ()
+
+irccd_define_test(
+    NAME dynlib-plugin
+    SOURCES main.cpp
+    LIBRARIES libirccd libirccd-test
+)