build: use GLOB to detect wx dep lib suffixes
Use file(GLOB ${lib_name}*.lib) to detect the appropriate suffixes for wx dependency libs, because the suffix keeps changing, sometimes there is a 'd' added for debug builds and sometimes it changes to not adding the suffix, this will make the code more robust and lead to fewer build failures. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
ec434a7c2f
commit
dedfb615d5
|
@ -150,15 +150,16 @@ if(WIN32 AND CMAKE_TOOLCHAIN_FILE MATCHES vcpkg AND (X86_32 OR X86_64))
|
|||
set(deb_suffix d)
|
||||
endif()
|
||||
|
||||
file(GLOB png_lib ${wxWidgets_LIB_DIR}/libpng*.lib)
|
||||
|
||||
list(APPEND wxWidgets_LIBRARIES
|
||||
${wxWidgets_LIB_DIR}/jpeg.lib
|
||||
${wxWidgets_LIB_DIR}/lzma.lib
|
||||
${wxWidgets_LIB_DIR}/tiff${deb_suffix}.lib
|
||||
${wxWidgets_LIB_DIR}/libexpat${deb_suffix}MD.lib
|
||||
${png_lib}
|
||||
foreach(lib_name libpng jpeg lzma tiff libexpat)
|
||||
file(
|
||||
GLOB lib_file
|
||||
${wxWidgets_LIB_DIR}/${lib_name}*.lib
|
||||
)
|
||||
|
||||
if(lib_file)
|
||||
list(APPEND wxWidgets_LIBRARIES ${lib_file})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(WXRC ${common_prefix}/tools/wxwidgets/wxrc.exe)
|
||||
|
|
Loading…
Reference in New Issue