summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-05-27 06:21:29 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-05-27 06:22:04 +0200
commit043fdbca178cd18f56a88bea5b171d024f32b79a (patch)
treebf62779032500f60ef3b299625ad07e4b9b5fa3a
parent75501dca9304c9ca691cc20aafc647d721c17218 (diff)
gui, qxt: use pkgconfig wrapper
-rw-r--r--gui/CMakeLists.txt6
-rw-r--r--qxt-mini/CMakeLists.txt14
2 files changed, 11 insertions, 9 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index 954fa67a..216b6f0e 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -16,6 +16,10 @@ endif()
if(LINUX)
target_link_libraries(opentrack-user-interface dl)
# for process detector
- target_link_libraries(opentrack-user-interface procps)
+
+ # XXX copy-paste from qxt-mini module
+ # make a pkg-config wrapper
+ # also set ${self} to target's name when invoking `otr_module' -sh 20180527
+ otr_pkgconfig(opentrack-user-interface libprocps)
endif()
diff --git a/qxt-mini/CMakeLists.txt b/qxt-mini/CMakeLists.txt
index 39f3525c..cc73e6a4 100644
--- a/qxt-mini/CMakeLists.txt
+++ b/qxt-mini/CMakeLists.txt
@@ -1,13 +1,11 @@
if(UNIX OR APPLE)
+ set(self opentrack-qxt-mini)
otr_module(qxt-mini NO-COMPAT BIN)
- if(NOT APPLE)
- pkg_check_modules(xprotopkg REQUIRED xproto)
- target_include_directories(opentrack-qxt-mini SYSTEM PRIVATE ${xprotopkg_INCLUDE_DIRS})
- target_link_libraries(opentrack-qxt-mini X11)
- add_definitions(-DQXT_BUILD)
- else()
- set_property(TARGET opentrack-qxt-mini
+ otr_pkgconfig(${self} x11 xcb xproto)
+ if(APPLE)
+ set_property(TARGET ${self}
APPEND_STRING PROPERTY
- LINK_FLAGS "-framework Carbon -framework CoreFoundation ")
+ LINK_FLAGS " -framework Carbon -framework CoreFoundation ")
endif()
+ target_compile_definitions(${self} PRIVATE -DQXT_BUILD)
endif()