mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 11:11:39 +08:00
18 lines
568 B
Diff
18 lines
568 B
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index dbd31d7..7deb6c2 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -109,6 +109,12 @@ elseif(POLICY CMP0074)
|
|
endif()
|
|
|
|
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU AND NOT EMSCRIPTEN)
|
|
+ block(SCOPE_FOR VARIABLES)
|
|
+ if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
|
+ list(PREPEND CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
|
+ endif()
|
|
+ find_library(M_LIBRARY m PATHS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
|
|
+ endblock()
|
|
find_library(M_LIBRARY m)
|
|
if(M_LIBRARY)
|
|
set(M_LIBRARY m)
|