aboutsummaryrefslogtreecommitdiff
path: root/test_support/CMakeLists.txt
blob: ce77a90b1eb038bd3c3524643bae3a12db191819 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
get_target_property(TRANSLATIONS_BINARY_DIR "lang" BINARY_DIR)

# Glib test support

add_library("test_support-glib" OBJECT
  "src/glib_main.cpp"
)

add_library("turns::glib-test-main" ALIAS "test_support-glib")

target_compile_features("test_support-glib" PRIVATE
  "cxx_std_23"
)

target_compile_definitions("test_support-glib" PUBLIC
  "TESTLOCALEDIR=\"${TRANSLATIONS_BINARY_DIR}\""
)

target_link_libraries("test_support-glib" PUBLIC
  "PkgConfig::glibmm"
)

# GTK test support

add_library("test_support-gtk" OBJECT
  "src/gtk_main.cpp"
)

add_library("turns::gtk-test-main" ALIAS "test_support-gtk")

target_compile_features("test_support-gtk" PRIVATE
  "cxx_std_23"
)

target_compile_definitions("test_support-gtk" PUBLIC
  "TESTLOCALEDIR=\"${TRANSLATIONS_BINARY_DIR}\""
)

target_link_libraries("test_support-gtk" PUBLIC
  "turns::lang"

  "PkgConfig::adwaita"
  "PkgConfig::gtkmm"
)

# Intl test support

add_library("test_support-intl" OBJECT
  "src/intl_main.cpp"
)

add_library("turns::intl-test-main" ALIAS "test_support-intl")

target_compile_features("test_support-intl" PRIVATE
  "cxx_std_23"
)

target_compile_definitions("test_support-intl" PUBLIC
  "TESTLOCALEDIR=\"${TRANSLATIONS_BINARY_DIR}\""
)

target_link_libraries("test_support-intl" PUBLIC
  "Intl::Intl"
  "turns::lang"
)