summaryrefslogtreecommitdiff
path: root/app/CMakeLists.txt
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2024-07-12 12:37:10 +0200
committerFelix Morgner <felix.morgner@gmail.com>2024-07-12 12:37:10 +0200
commit87d659ca1a14fe8cf4871b8db0f42d005964f565 (patch)
tree704e94d644d2f27d474fdc211894cf0ab88614e4 /app/CMakeLists.txt
parent61ba5c151040533f23642c07fc2230a5718396ee (diff)
downloadturns-87d659ca1a14fe8cf4871b8db0f42d005964f565.tar.xz
turns-87d659ca1a14fe8cf4871b8db0f42d005964f565.zip
app/windows: add basic main window
Diffstat (limited to 'app/CMakeLists.txt')
-rw-r--r--app/CMakeLists.txt22
1 files changed, 21 insertions, 1 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 88dea68..824e107 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -2,6 +2,7 @@
add_library("app"
"src/application.cpp"
+ "src/windows/main.cpp"
)
add_library("turns::app" ALIAS "app")
@@ -11,6 +12,9 @@ target_compile_options("app" PUBLIC
"$<$<CXX_COMPILER_ID:GNU,Clang>:-Wextra>"
"$<$<CXX_COMPILER_ID:GNU,Clang>:-Werror>"
"$<$<CXX_COMPILER_ID:GNU,Clang>:-pedantic-errors>"
+ PRIVATE
+ "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:-fprofile-arcs>"
+ "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:-ftest-coverage>"
)
target_include_directories("app" PUBLIC
@@ -18,6 +22,8 @@ target_include_directories("app" PUBLIC
)
target_link_libraries("app" PUBLIC
+ "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:gcov>"
+
"PkgConfig::adwaita"
"PkgConfig::gtkmm"
@@ -51,4 +57,18 @@ configure_file("desktop.in"
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/turns.desktop"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
-) \ No newline at end of file
+)
+
+# Tests
+
+add_executable("app-tests"
+ "tests/windows/main.cpp"
+)
+
+target_link_libraries("app-tests" PRIVATE
+ "Catch2::Catch2"
+ "turns::app"
+ "turns::gtk-test-main"
+)
+
+catch_discover_tests("app-tests") \ No newline at end of file