aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhoebe <20694052+PhoebeHui@users.noreply.github.com>2020-06-11 17:12:09 +0800
committerGitHub <noreply@github.com>2020-06-11 02:12:09 -0700
commitcb97769f89ee2c39442a04eb389847b84862a790 (patch)
tree761528f37892bb02a9f01371bca3c269993f5666
parenta5e28c4b357d8c4116c4e98263b7504e73e52dae (diff)
downloadvcpkg-cb97769f89ee2c39442a04eb389847b84862a790.tar.gz
vcpkg-cb97769f89ee2c39442a04eb389847b84862a790.zip
[irrlicht] Add Supports and fix environment variable reference (#11852)
-rw-r--r--ports/irrlicht/CMakeLists.txt2
-rw-r--r--ports/irrlicht/CONTROL1
-rw-r--r--ports/irrlicht/portfile.cmake15
3 files changed, 7 insertions, 11 deletions
diff --git a/ports/irrlicht/CMakeLists.txt b/ports/irrlicht/CMakeLists.txt
index e17d718d8..d7e0c8f50 100644
--- a/ports/irrlicht/CMakeLists.txt
+++ b/ports/irrlicht/CMakeLists.txt
@@ -16,7 +16,7 @@ set(IRR_TOOL_DIR "tools")
# -------------------------------------------------------------------------------------------------
set(DXSDK "")
if(DEFINED ENV{DXSDK_DIR})
- set(DXSDK "ENV{DXSDK_DIR}")
+ set(DXSDK "$ENV{DXSDK_DIR}")
endif()
set(IRR_UNICODE_PATH 0 CACHE BOOL "Whether to enable unicode path support on windows")
diff --git a/ports/irrlicht/CONTROL b/ports/irrlicht/CONTROL
index 5870178c2..22b622eae 100644
--- a/ports/irrlicht/CONTROL
+++ b/ports/irrlicht/CONTROL
@@ -3,6 +3,7 @@ Version: 1.8.4-5
Homepage: http://irrlicht.sourceforge.net
Description: Irrlicht lightning fast 3d engine
Build-Depends: zlib, libpng, bzip2, libjpeg-turbo
+Supports: !(arm|uwp|osx)
Feature: unicode
Description: Support unicode path on windows
diff --git a/ports/irrlicht/portfile.cmake b/ports/irrlicht/portfile.cmake
index f10e80422..8fbf0d57b 100644
--- a/ports/irrlicht/portfile.cmake
+++ b/ports/irrlicht/portfile.cmake
@@ -1,3 +1,5 @@
+vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "osx" "uwp")
+
vcpkg_download_distfile(ARCHIVE
URLS "https://downloads.sourceforge.net/project/irrlicht/Irrlicht%20SDK/1.8/1.8.4/irrlicht-1.8.4.zip"
FILENAME "irrlicht-1.8.4.zip"
@@ -12,9 +14,7 @@ vcpkg_extract_source_archive_ex(
"fix-encoding.patch"
)
-# Copy CMakeLists.txt to the source, because Irrlicht does not have one.
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt DESTINATION ${SOURCE_PATH})
+configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@@ -24,10 +24,7 @@ vcpkg_check_features(
tools IRR_BUILD_TOOLS
)
-set(SHARED_LIB TRUE)
-if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
- set(SHARED_LIB FALSE)
-endif()
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIB)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@@ -52,7 +49,5 @@ vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/irrlicht)
endif()
-# Post-build test for cmake libraries
-vcpkg_test_cmake(PACKAGE_NAME irrlicht)
-file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file