mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
MinGW: Fix vcpkg common definitions (#9807)
Since MinGW has both VCPKG_TARGET_IS_MINGW and VCPKG_TARGET_IS_WINDOWS, make sure to test the first before.
This commit is contained in:
parent
3aa5979471
commit
8c77506c4f
@ -64,7 +64,16 @@ else()
|
||||
endif()
|
||||
|
||||
#Helper variables for libraries
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
if(VCPKG_TARGET_IS_MINGW)
|
||||
set(VCPKG_TARGET_STATIC_LIBRARY_SUFFIX ".a")
|
||||
set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX ".dll.a")
|
||||
set(VCPKG_TARGET_SHARED_LIBRARY_SUFFIX ".dll")
|
||||
set(VCPKG_TARGET_STATIC_LIBRARY_PREFIX "lib")
|
||||
set(VCPKG_TARGET_SHARED_LIBRARY_PREFIX "lib")
|
||||
set(VCPKG_TARGET_IMPORT_LIBRARY_PREFIX "lib")
|
||||
set(VCPKG_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib")
|
||||
set(VCPKG_FIND_LIBRARY_PREFIXES "lib" "")
|
||||
elseif(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(VCPKG_TARGET_STATIC_LIBRARY_SUFFIX ".lib")
|
||||
set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX ".lib")
|
||||
set(VCPKG_TARGET_SHARED_LIBRARY_SUFFIX ".dll")
|
||||
@ -74,15 +83,6 @@ if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(VCPKG_TARGET_IMPORT_LIBRARY_PREFIX "")
|
||||
set(VCPKG_FIND_LIBRARY_SUFFIXES ".lib" ".dll") #This is a slight modification to CMakes value which does not include ".dll".
|
||||
set(VCPKG_FIND_LIBRARY_PREFIXES "" "lib") #This is a slight modification to CMakes value which does not include "lib".
|
||||
elseif(VCPKG_TARGET_IS_MINGW)
|
||||
set(VCPKG_TARGET_STATIC_LIBRARY_SUFFIX ".a")
|
||||
set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX ".dll.a")
|
||||
set(VCPKG_TARGET_SHARED_LIBRARY_SUFFIX ".dll")
|
||||
set(VCPKG_TARGET_STATIC_LIBRARY_PREFIX "lib")
|
||||
set(VCPKG_TARGET_SHARED_LIBRARY_PREFIX "lib")
|
||||
set(VCPKG_TARGET_IMPORT_LIBRARY_PREFIX "lib")
|
||||
set(VCPKG_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib")
|
||||
set(VCPKG_FIND_LIBRARY_PREFIXES "lib" "")
|
||||
elseif(VCPKG_TARGET_IS_OSX)
|
||||
set(VCPKG_TARGET_STATIC_LIBRARY_SUFFIX ".a")
|
||||
set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user