mrdoge / rpms / mir

Forked from rpms/mir 5 years ago
Clone
Blob Blame History Raw
From c27b8dda733e15fa1ca450eb7abb2408d47897af 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 ace5f67..e2d4f2f 100644
--- a/tests/acceptance-tests/wayland/CMakeLists.txt
+++ b/tests/acceptance-tests/wayland/CMakeLists.txt
@@ -10,13 +10,13 @@ ExternalProject_Add(
     -DCMAKE_CXX_FLAGS='${CMAKE_CXX_FLAGS}'
     -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
     -DCMAKE_SHARED_LINKER_FLAGS='${CMAKE_SHARED_LINKER_FLAGS}'
-    -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 b63a29e..f4516c0 100644
--- a/tests/acceptance-tests/wayland/wlcs/CMakeLists.txt
+++ b/tests/acceptance-tests/wayland/wlcs/CMakeLists.txt
@@ -57,7 +57,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