early-access version 2853
This commit is contained in:
31
externals/vcpkg/ports/thor/fix-dependency-sfml.patch
vendored
Executable file
31
externals/vcpkg/ports/thor/fix-dependency-sfml.patch
vendored
Executable file
@@ -0,0 +1,31 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 03536be..abcff44 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -115,11 +115,10 @@ set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules/;${CMAKE_MODULE_PATH
|
||||
if(NOT THOR_SHARED_LIBS)
|
||||
set(SFML_STATIC_LIBRARIES TRUE)
|
||||
endif()
|
||||
-find_package(SFML 2 COMPONENTS audio graphics window system)
|
||||
+find_package(SFML COMPONENTS system window graphics CONFIG REQUIRED)
|
||||
+set(SFML_LIBRARIES sfml-system sfml-network sfml-graphics sfml-window)
|
||||
|
||||
-if(SFML_FOUND)
|
||||
- include_directories(${SFML_INCLUDE_DIR})
|
||||
-else()
|
||||
+if(0)
|
||||
set(SFML_ROOT "" CACHE PATH "SFML top-level directory")
|
||||
message("\n-> SFML directory not found. Set SFML_ROOT to SFML's top-level path (containing \"include\" and \"lib\" directories).")
|
||||
message("-> Make sure the SFML libraries with the same configuration (Release/Debug, Static/Dynamic) exist.\n")
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 75e118e..0f90ac8 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -72,6 +72,7 @@ else()
|
||||
add_library(${THOR_LIB} STATIC ${THOR_SRC})
|
||||
set_target_properties(${THOR_LIB} PROPERTIES DEBUG_POSTFIX -s-d)
|
||||
set_target_properties(${THOR_LIB} PROPERTIES RELEASE_POSTFIX -s)
|
||||
+ thor_link_sfml(${THOR_LIB})
|
||||
endif()
|
||||
|
||||
|
||||
56
externals/vcpkg/ports/thor/portfile.cmake
vendored
Executable file
56
externals/vcpkg/ports/thor/portfile.cmake
vendored
Executable file
@@ -0,0 +1,56 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Bromeon/Thor
|
||||
REF v2.0
|
||||
SHA512 634fa5286405d9a8a837c082ace98bbb02e609521418935855b9e2fcad57003dbe35088bd771cf6a9292e55d3787f7e463d7a4cca0d0f007509de2520d9a8cf9
|
||||
HEAD_REF master
|
||||
PATCHES fix-dependency-sfml.patch
|
||||
)
|
||||
file(REMOVE "${SOURCE_PATH}/cmake/Modules/FindSFML.cmake")
|
||||
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/extlibs")
|
||||
file(COPY "${CURRENT_INSTALLED_DIR}/include/Aurora" DESTINATION "${SOURCE_PATH}/extlibs/aurora/include")
|
||||
file(WRITE "${SOURCE_PATH}/extlibs/aurora/License.txt")
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" THOR_STATIC_STD_LIBS)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" THOR_SHARED_LIBS)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DTHOR_SHARED_LIBS=${THOR_SHARED_LIBS}
|
||||
-DTHOR_STATIC_STD_LIBS=${THOR_STATIC_STD_LIBS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp"
|
||||
"defined(SFML_STATIC)" "1"
|
||||
)
|
||||
else()
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp"
|
||||
"defined(SFML_STATIC)" "0"
|
||||
)
|
||||
endif()
|
||||
|
||||
file(GLOB LICENSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/LicenseThor.txt"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/LicenseAurora.txt"
|
||||
"${CURRENT_PACKAGES_DIR}/LicenseThor.txt"
|
||||
"${CURRENT_PACKAGES_DIR}/LicenseAurora.txt"
|
||||
)
|
||||
|
||||
if(LICENSE)
|
||||
file(REMOVE ${LICENSE})
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/include/Aurora")
|
||||
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
endif()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/License.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
16
externals/vcpkg/ports/thor/vcpkg.json
vendored
Executable file
16
externals/vcpkg/ports/thor/vcpkg.json
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "thor",
|
||||
"version": "2.0",
|
||||
"port-version": 5,
|
||||
"description": "Extends the multimedia library SFML with higher-level features",
|
||||
"homepage": "www.bromeon.ch/libraries/thor",
|
||||
"license": "Zlib",
|
||||
"dependencies": [
|
||||
"aurora",
|
||||
"sfml",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user