summaryrefslogtreecommitdiff
path: root/cmake/test.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/test.cmake')
-rw-r--r--cmake/test.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/cmake/test.cmake b/cmake/test.cmake
index 1f3bd42c63..16b7d630e2 100644
--- a/cmake/test.cmake
+++ b/cmake/test.cmake
@@ -1,6 +1,12 @@
-add_executable(mbgl-test
- ${MBGL_TEST_FILES}
-)
+if (MBGL_TEST_TARGET_TYPE STREQUAL "library")
+ add_library(mbgl-test SHARED
+ ${MBGL_TEST_FILES}
+ )
+else()
+ add_executable(mbgl-test
+ ${MBGL_TEST_FILES}
+ )
+endif()
target_compile_options(mbgl-test
PRIVATE -fvisibility-inlines-hidden