From 6ebd85146effd57e6f653201f4119b1da366107c Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Wed, 4 Jul 2018 12:15:52 -0400 Subject: [PATCH] cmake: Only link tests statically for android-system target Signed-off-by: Andrew Gunnerson --- libmbbootimg/CMakeLists.txt | 2 +- libmbcommon/CMakeLists.txt | 2 +- libmbdevice/CMakeLists.txt | 2 +- libmbsign/CMakeLists.txt | 2 +- libmbsparse/CMakeLists.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libmbbootimg/CMakeLists.txt b/libmbbootimg/CMakeLists.txt index 228bb53a5..36b855b8a 100644 --- a/libmbbootimg/CMakeLists.txt +++ b/libmbbootimg/CMakeLists.txt @@ -118,7 +118,7 @@ if(variants AND MBP_ENABLE_TESTS) OpenSSL::Crypto ) - if(ANDROID) + if(${MBP_BUILD_TARGET} STREQUAL android-system) unix_link_executable_statically(mbbootimg_tests) endif() diff --git a/libmbcommon/CMakeLists.txt b/libmbcommon/CMakeLists.txt index 5ca9104cd..f8a86ae15 100644 --- a/libmbcommon/CMakeLists.txt +++ b/libmbcommon/CMakeLists.txt @@ -166,7 +166,7 @@ if(variants AND MBP_ENABLE_TESTS) gmock_main ) - if(ANDROID) + if(${MBP_BUILD_TARGET} STREQUAL android-system) unix_link_executable_statically(mbcommon_tests) endif() diff --git a/libmbdevice/CMakeLists.txt b/libmbdevice/CMakeLists.txt index a8da1e6fc..0ca341494 100644 --- a/libmbdevice/CMakeLists.txt +++ b/libmbdevice/CMakeLists.txt @@ -129,7 +129,7 @@ if(variants AND MBP_ENABLE_TESTS) gtest_main ) - if(ANDROID) + if(${MBP_BUILD_TARGET} STREQUAL android-system) unix_link_executable_statically(mbdevice_tests) endif() diff --git a/libmbsign/CMakeLists.txt b/libmbsign/CMakeLists.txt index 7ac0366d3..0bb1474cc 100644 --- a/libmbsign/CMakeLists.txt +++ b/libmbsign/CMakeLists.txt @@ -77,7 +77,7 @@ if(variants AND MBP_ENABLE_TESTS) gtest_main ) - if(ANDROID) + if(${MBP_BUILD_TARGET} STREQUAL android-system) unix_link_executable_statically(mbsign_tests) endif() diff --git a/libmbsparse/CMakeLists.txt b/libmbsparse/CMakeLists.txt index 7ae63a7eb..94504013b 100644 --- a/libmbsparse/CMakeLists.txt +++ b/libmbsparse/CMakeLists.txt @@ -77,7 +77,7 @@ if(variants AND MBP_ENABLE_TESTS) gtest_main ) - if(ANDROID) + if(${MBP_BUILD_TARGET} STREQUAL android-system) unix_link_executable_statically(mbsparse_tests) endif()