Don't generate pkg-config when compiling with MSVC

This commit is contained in:
Chocobo1 2019-01-06 22:35:35 +08:00 committed by Arvid Norberg
parent 0ce899e273
commit e53bc71f63
1 changed files with 5 additions and 1 deletions

View File

@ -361,7 +361,11 @@ foreach (s ${COMPILETIME_OPTIONS_LIST})
set (COMPILETIME_OPTIONS "${COMPILETIME_OPTIONS} -D${s}")
endforeach (s)
generate_and_install_pkg_config_file(torrent-rasterbar libtorrent-rasterbar)
# There is little to none support for using pkg-config with MSVC and most users won't bother with it.
# However, msys is a linux-like platform on Windows that do support/prefer using pkg-config.
if (NOT MSVC)
generate_and_install_pkg_config_file(torrent-rasterbar libtorrent-rasterbar)
endif()
install(TARGETS torrent-rasterbar EXPORT LibtorrentRasterbarTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}