diff --git a/CMakeLists.txt b/CMakeLists.txt index c4d9732..c5eea0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -378,6 +378,15 @@ if(PHYSFS_INSTALL) configure_file(cmake/cmake_uninstall.cmake.in cmake_uninstall.cmake IMMEDIATE @ONLY) add_custom_target(uninstall-physfs COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") + if(MSVC) + if(PHYSFS_BUILD_SHARED) + set(PC_LIBS [=[-LIBPATH:${libdir} physfs.lib]=]) + else() + set(PC_LIBS [=[-LIBPATH:${libdir} physfs-static.lib]=]) + endif() + else() + set(PC_LIBS [=[-L${libdir} -lphysfs]=]) + endif() if(NOT MSVC) configure_file(cmake/physfs.pc.in physfs.pc @ONLY) diff --git a/cmake/physfs.pc.in b/cmake/physfs.pc.in index 5813d95..641b2bc 100644 --- a/cmake/physfs.pc.in +++ b/cmake/physfs.pc.in @@ -8,5 +8,5 @@ Description: PhysicsFS is a library to provide abstract access to various archiv URL: https://icculus.org/physfs/ Version: @PHYSFS_VERSION@ Requires.private: @PC_PRIVATE_REQUIRES@ -Libs: -L${libdir} -lphysfs +Libs: @PC_LIBS@ Cflags: -I${includedir}