mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-11-24 03:39:45 +00:00
Added proper window-static support
Just replacing export symbols doesn't really do the trick as the config file still won't find the static libraries, by "forcing" the `SFML_STATIC_LIBRARIES` to true when using the static target, the SFMLConfig.cmake and SFMLConfigDependencies.cmake files will properly detect the static libraries and it will also set the config header correctly.
This commit is contained in:
parent
9750fff027
commit
2a9fd468eb
@ -30,9 +30,9 @@ vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SFML)
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# don't force users to define SFML_STATIC while using static library
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(APPEND ${CURRENT_PACKAGES_DIR}/include/SFML/Config.hpp "#undef SFML_API_IMPORT\n#define SFML_API_IMPORT\n")
|
||||
FILE(READ ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake SFML_CONFIG)
|
||||
FILE(WRITE ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake "set(SFML_STATIC_LIBRARIES true)\n${SFML_CONFIG}")
|
||||
endif()
|
||||
|
||||
# move sfml-main to manual link dir
|
||||
|
Loading…
Reference in New Issue
Block a user