Blob Blame History Raw
From 87157d9452ca70f6df1775ab7995d646e8161d84 Mon Sep 17 00:00:00 2001
From: Neal Gompa <ngompa13@gmail.com>
Date: Sun, 17 Dec 2017 11:18:28 -0500
Subject: [PATCH] tests/acceptance-tests/wayland: Make wlcs build as a static
 library

By building a static library instead of a dynamic one, there's no
chance of the bundled library leaking into things when it shouldn't.

This is basically a temporary fix until wlcs is properly released and
Mir can leverage a pre-built copy.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
---
 tests/acceptance-tests/wayland/CMakeLists.txt      | 6 +++---
 tests/acceptance-tests/wayland/wlcs/CMakeLists.txt | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/acceptance-tests/wayland/CMakeLists.txt b/tests/acceptance-tests/wayland/CMakeLists.txt
index 7555e6a..b1ae68f 100644
--- a/tests/acceptance-tests/wayland/CMakeLists.txt
+++ b/tests/acceptance-tests/wayland/CMakeLists.txt
@@ -9,13 +9,13 @@ ExternalProject_Add(
     -DCMAKE_C_COMPILER='${CMAKE_C_COMPILER}'
     -DCMAKE_CXX_FLAGS='${CMAKE_CXX_FLAGS}'
     -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-    -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-  BUILD_BYPRODUCTS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libwlcs.so
+    -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+  BUILD_BYPRODUCTS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libwlcs.a
   INSTALL_COMMAND true
   BUILD_ALWAYS TRUE)
 
 add_library(libwlcs STATIC IMPORTED)
-set_target_properties(libwlcs PROPERTIES IMPORTED_LOCATION ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libwlcs.so)
+set_target_properties(libwlcs PROPERTIES IMPORTED_LOCATION ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libwlcs.a)
 add_dependencies(libwlcs wlcs)
 
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/wlcs/include)
diff --git a/tests/acceptance-tests/wayland/wlcs/CMakeLists.txt b/tests/acceptance-tests/wayland/wlcs/CMakeLists.txt
index 8ca0f75..80ba972 100644
--- a/tests/acceptance-tests/wayland/wlcs/CMakeLists.txt
+++ b/tests/acceptance-tests/wayland/wlcs/CMakeLists.txt
@@ -55,7 +55,7 @@ include_directories(${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR})
 add_subdirectory(src/protocol/)
 
 add_library(
-  wlcs SHARED
+  wlcs STATIC
 
   include/display_server.h
   include/helpers.h
-- 
2.17.1