build: restrict MSVC static libs to .lib only
The MSVC linker can now apparently link MinGW .a static libs too, and StrawberryPerl pollutes the build with its own. Set CMAKE_FIND_LIBRARY_SUFFIXES to .lib only when MSVC is true for static builds. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
5807376fba
commit
6d8ca723d0
|
@ -118,7 +118,9 @@ if(VBAM_STATIC)
|
|||
set_property(GLOBAL PROPERTY LINK_SEARCH_START_STATIC ON)
|
||||
set_property(GLOBAL PROPERTY LINK_SEARCH_END_STATIC ON)
|
||||
|
||||
if(NOT MSVC)
|
||||
if(MSVC)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib)
|
||||
else()
|
||||
list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 .a)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -102,8 +102,8 @@ FIND_PATH(SDL2_INCLUDE_DIR SDL.h
|
|||
SET(CURRENT_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
||||
if(SDL2_STATIC)
|
||||
if(WIN32)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a)
|
||||
if(MSVC)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib)
|
||||
else()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue