Skip to content

Commit 09d81e0

Browse files
Build static or shared libraries for all platforms (#208)
Allow building static or shared libraries for all platforms instead of hardcoding this option in the cmake file. Allows the client to choose the configuration based on the value of the standard CMake option BUILD_SHARED_LIBS.
1 parent daf630d commit 09d81e0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

contrib/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,8 @@ list(APPEND gemmlowp_test_headers ${gemmlowp_headers})
4747
file(GLOB fixedpoint_private_headers "${gemmlowp_src}/fixedpoint/*.h")
4848
list(APPEND fixedpoint_private_headers "${gemmlowp_src}/internal/common.h")
4949

50-
# Eight bit int gemm library
51-
if(WIN32)
52-
add_library(eight_bit_int_gemm STATIC ${eight_bit_int_gemm_sources_with_no_headers})
53-
else()
54-
add_library(eight_bit_int_gemm SHARED ${eight_bit_int_gemm_sources_with_no_headers})
55-
endif()
50+
add_library(eight_bit_int_gemm ${eight_bit_int_gemm_sources_with_no_headers})
51+
set_target_properties(eight_bit_int_gemm PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
5652
target_link_libraries(eight_bit_int_gemm ${EXTERNAL_LIBRARIES})
5753

5854
# INTERFACE target to help header include

0 commit comments

Comments
 (0)