aboutsummaryrefslogtreecommitdiff
path: root/source/apps/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'source/apps/CMakeLists.txt')
-rw-r--r--source/apps/CMakeLists.txt54
1 files changed, 54 insertions, 0 deletions
diff --git a/source/apps/CMakeLists.txt b/source/apps/CMakeLists.txt
new file mode 100644
index 0000000..2da5537
--- /dev/null
+++ b/source/apps/CMakeLists.txt
@@ -0,0 +1,54 @@
+include("CheckIPOSupported")
+
+check_ipo_supported(RESULT "WANDA_IPO_SUPPORTED")
+
+find_package("lyra" REQUIRED)
+
+add_library("wandac-components" OBJECT
+ "src/wandac/cli.cpp"
+ "src/wandac/listener.cpp"
+)
+
+target_link_libraries("wandac-components" PUBLIC
+ "wanda"
+ "bfg::lyra"
+)
+
+target_include_directories("wandac-components" PUBLIC "include")
+
+add_executable("wandac"
+ "src/wandac/main.cpp"
+)
+
+target_link_libraries("wandac" PRIVATE
+ "wandac-components"
+)
+
+add_executable("wandac-tests"
+ "tests/wandac/cli.cpp"
+)
+
+target_link_libraries("wandac-tests" PRIVATE
+ "wandac-components"
+ "Catch2::Catch2WithMain"
+)
+
+catch_discover_tests("wandac-tests")
+
+add_executable("wandad"
+ "src/wandad/main.cpp"
+)
+
+target_link_libraries("wandad" PRIVATE
+ "wanda"
+ "bfg::lyra"
+)
+
+set_target_properties("wandac" "wandad" PROPERTIES
+ INTERPROCEDURAL_OPTIMIZATION ${WANDA_IPO_SUPPORTED}
+)
+
+install(TARGETS
+ "wandac"
+ "wandad"
+)