2020-06-27 06:06:30 +08:00
|
|
|
vcpkg_from_sourceforge(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO irrlicht/Irrlicht%20SDK
|
2023-05-24 04:46:17 +08:00
|
|
|
REF 1.8/${VERSION}
|
|
|
|
FILENAME "irrlicht-${VERSION}.zip"
|
|
|
|
SHA512 d11c7a056bfb8c9737ed583c5bc5794223bc59fb4620411b63bc4d1eedc41db2ed1cab5cb7a37fee42a7f38c0e0645f5fc53fd329fff0f2aa78e0df6804c47c9
|
2021-07-07 04:51:11 +08:00
|
|
|
PATCHES
|
|
|
|
fix-encoding.patch
|
|
|
|
fix-osx-compilation.patch
|
2019-02-26 05:51:13 +08:00
|
|
|
)
|
|
|
|
|
2022-01-21 02:30:30 +08:00
|
|
|
if(VCPKG_TARGET_IS_LINUX)
|
|
|
|
message(
|
|
|
|
"Irrlicht currently requires the following libraries from the system package manager:
|
|
|
|
libgl1-mesa
|
|
|
|
xf86vmode
|
|
|
|
|
|
|
|
These can be installed on Ubuntu systems via sudo apt-get install libgl1-mesa-dev libxxf86vm-dev")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${SOURCE_PATH}/CMakeLists.txt" COPYONLY)
|
2019-02-26 05:51:13 +08:00
|
|
|
|
2020-02-14 15:00:31 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
unicode IRR_UNICODE_PATH
|
|
|
|
fast-fpu IRR_FAST_MATH
|
|
|
|
tools IRR_BUILD_TOOLS
|
|
|
|
)
|
2019-02-26 05:51:13 +08:00
|
|
|
|
2020-06-11 17:12:09 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIB)
|
2019-02-26 05:51:13 +08:00
|
|
|
|
2021-07-07 04:51:11 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-01-21 02:30:30 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-07-07 04:51:11 +08:00
|
|
|
OPTIONS
|
2020-02-14 15:00:31 +08:00
|
|
|
-DIRR_SHARED_LIB=${SHARED_LIB}
|
|
|
|
${FEATURE_OPTIONS}
|
2019-02-26 05:51:13 +08:00
|
|
|
)
|
|
|
|
|
2021-07-07 04:51:11 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-02-26 05:51:13 +08:00
|
|
|
|
2021-07-07 04:51:11 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
2019-02-26 05:51:13 +08:00
|
|
|
|
2020-02-14 15:00:31 +08:00
|
|
|
if("tools" IN_LIST FEATURES)
|
2022-01-21 02:30:30 +08:00
|
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/irrlicht/")
|
2019-02-26 05:51:13 +08:00
|
|
|
endif()
|
|
|
|
|
2022-01-21 02:30:30 +08:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/irrlicht/irrlicht-config.cmake" "include(\${CMAKE_CURRENT_LIST_DIR}/irrlicht-targets.cmake)")
|
2019-02-26 05:51:13 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2019-07-18 07:26:18 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2022-01-21 02:30:30 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/irrlicht")
|
2019-07-18 07:26:18 +08:00
|
|
|
endif()
|
2019-09-06 01:43:09 +08:00
|
|
|
|
2023-05-24 04:46:17 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt")
|