[sfml][imgui-sfml] Push SFML_STATIC_LIBRARIES setting into sfml (#11800)

This commit is contained in:
ras0219 2020-08-22 01:29:59 -07:00 committed by GitHub
parent 5d331ed553
commit de0501f187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 18 deletions

View File

@ -1,5 +1,5 @@
Source: imgui-sfml
Version: 2.1-1
Version: 2.1-2
Homepage: https://github.com/eliasdaler/imgui-sfml
Description: ImGui binding for use with SFML
Build-Depends: sfml, imgui
Build-Depends: sfml, imgui, opengl

View File

@ -13,23 +13,9 @@ vcpkg_from_github(
004-fix-find-sfml.patch
)
if (VCPKG_TARGET_IS_WINDOWS)
file(GLOB SFML_DYNAMIC_LIBS "${CURRENT_INSTALLED_DIR}/bin/sfml-*")
else()
file(GLOB SFML_DYNAMIC_LIBS "${CURRENT_INSTALLED_DIR}/bin/libsfml-*")
endif()
if (SFML_DYNAMIC_LIBS)
set(SFML_STATIC OFF)
else()
set(SFML_STATIC ON)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DSFML_STATIC_LIBRARIES=${SFML_STATIC}
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()

View File

@ -1,6 +1,6 @@
Source: sfml
Version: 2.5.1
Port-Version: 8
Port-Version: 9
Homepage: https://github.com/sfml/sfml
Description: Simple and fast multimedia library
Build-Depends: freetype, libflac, libogg, libvorbis, openal-soft, stb

View File

@ -33,9 +33,11 @@ vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SFML)
vcpkg_copy_pdbs()
FILE(READ ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake SFML_CONFIG)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
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)\ninclude(CMakeFindDependencyMacro)\nfind_dependency(Freetype)\n${SFML_CONFIG}")
else()
FILE(WRITE ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake "set(SFML_STATIC_LIBRARIES false)\n${SFML_CONFIG}")
endif()
# move sfml-main to manual link dir