summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-07-05 14:02:05 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 17:24:00 +0200
commit77fcaa36178e739044b8ce4e68388440c4379a74 (patch)
tree5fa9244f9df588c105fa479cba4a60e4a8a0d483 /src/CMakeLists.txt
parente7c854bbf61d50410589a5ad56c961bf7a6ce29e (diff)
Implement window manager as an AGL App-FW binding
* Compile to shared object module, to be loaded by afb-daemon. * Take most of main, rewrite to adhere to the AFB API. * Implement dummy API call winman/status. * Use export.map to specify symbol visibility. * Poller and unique_fd are currently useless/unused. * Logging is still only to stdout/stderr. Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2b81367..4a0eafe 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,13 @@
wlproto(IVI_CON ivi-controller)
-add_executable(winman
+include(FindPkgConfig)
+pkg_check_modules(AFB REQUIRED afb-daemon==1.0)
+pkg_check_modules(SD REQUIRED libsystemd>=222)
+
+# We do not want a prefix for our module
+set(CMAKE_SHARED_MODULE_PREFIX "")
+
+add_library(winman MODULE
main.cpp
wayland.cpp
wayland.hpp
@@ -8,12 +15,24 @@ add_executable(winman
util.hpp
${IVI_CON_PROTO})
+target_include_directories(winman
+ PRIVATE
+ ${AFB_INCLUDE_DIRS}
+ ${SD_INCLUDE_DIRS}
+ ../include)
+
+target_link_libraries(winman
+ PRIVATE
+ ${AFB_LIBRARIES}
+ ${WLC_LIBRARIES}
+ ${SD_LIBRARIES})
+
target_compile_definitions(winman
PRIVATE
WINMAN_VERSION_STRING="${PACKAGE_VERSION}"
_GNU_SOURCE) # XXX should I define this here?!
-if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Release")
target_compile_definitions(winman
PRIVATE
_GLIBCXX_DEBUG)
@@ -33,7 +52,9 @@ set_target_properties(winman
C_EXTENSIONS OFF
C_STANDARD 99
- C_STANDARD_REQUIRED ON)
+ C_STANDARD_REQUIRED ON
+
+ LINK_FLAGS "-Wl,--version-script=../../export.map")
if (NOT ${SANITIZER_MODE} STREQUAL "none" AND NOT ${SANITIZER_MODE} STREQUAL "")
target_compile_options(winman
@@ -43,6 +64,3 @@ if (NOT ${SANITIZER_MODE} STREQUAL "none" AND NOT ${SANITIZER_MODE} STREQUAL "")
PROPERTIES
LINK_FLAGS "-fsanitize=${SANITIZER_MODE} -g")
endif()
-
-target_link_libraries(winman
- ${WLC_LIBRARIES})