vcpkg/ports/allegro5/portfile.cmake

95 lines
3.1 KiB
CMake
Raw Normal View History

2017-07-14 19:46:45 -04:00
# Common Ambient Variables:
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
# PORT = current port name (zlib, etc)
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
#
include(vcpkg_common_functions)
2017-07-20 17:25:17 -04:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
2017-07-20 17:25:17 -04:00
REPO liballeg/allegro5
2018-08-10 17:27:05 +10:00
REF 5.2.4.0
SHA512 46a7c7b65ffb49ae5c81e5a33d850b4ae94b59135fc9b15174ffe86133445ff328c623c2c48298d3f631cc6310d51f4f3f07b8b952ecbd360755001292cbda8b
2017-07-20 17:25:17 -04:00
HEAD_REF master
2017-07-14 19:46:45 -04:00
)
2017-07-15 13:56:02 -04:00
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(ALLEGRO_USE_STATIC ON)
2017-07-15 13:56:02 -04:00
else()
set(ALLEGRO_USE_STATIC OFF)
2017-07-15 13:56:02 -04:00
endif()
2017-07-20 19:32:22 -04:00
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/fix-pdb-install.patch
)
2017-07-14 19:46:45 -04:00
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA # Disable this option if project cannot be built with Ninja
OPTIONS
-DWANT_DOCS=OFF
-DALLEGRO_SDL=OFF
-DWANT_DEMO=OFF
-DSHARED=${ALLEGRO_USE_STATIC}
-DWANT_EXAMPLES=OFF
-DWANT_CURL_EXAMPLE=OFF
-DWANT_TESTS=OFF
-DWANT_AUDIO=ON
-DWANT_COLOR=ON
-DWANT_D3D=ON
2017-07-15 00:46:09 -04:00
-DWANT_D3D9EX=OFF # Not available on vcpkg
-DWANT_DSOUND=ON
-DWANT_FLAC=ON
-DWANT_FONT=ON
-DWANT_GLES2=ON
-DWANT_GLES3=ON
-DWANT_IMAGE=ON
-DWANT_IMAGE_JPG=ON
-DWANT_IMAGE_PNG=ON
-DWANT_MEMFILE=ON
-DWANT_MODAUDIO=OFF # Not available on vcpkg right now
-DWANT_NATIVE_DIALOG=ON
-DWANT_NATIVE_IMAGE_LOADER=ON
-DWANT_OGG_VIDEO=ON
-DWANT_OPENAL=ON
-DWANT_OPENGL=ON
-DWANT_OPENSL=OFF # Not yet available on vcpkg
-DWANT_OPUS=ON
-DWANT_PHYSFS=ON
-DWANT_POPUP_EXAMPLES=OFF
-DWANT_PRIMITIVES=ON
-DWANT_RELEASE_LOGGING=OFF
-DWANT_SHADERS_D3D=ON
-DWANT_SHADERS_GL=ON
-DWANT_TREMOR=OFF # Not yet available on vcpkg
-DWANT_TTF=ON
-DWANT_VIDEO=ON
-DWANT_VORBIS=ON
-DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/AL
-DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
2017-07-14 19:46:45 -04:00
OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON
2017-08-21 17:59:31 -04:00
OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF
2017-07-14 19:46:45 -04:00
)
vcpkg_install_cmake()
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/allegro5)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/allegro5/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/allegro5/copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
2017-07-15 11:47:50 -04:00
file(GLOB PDB_GLOB ${CURRENT_BUILDTREES_DIR}-dbg/lib/*.pdb)
2017-07-20 16:37:30 -04:00
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug)
2017-07-15 11:00:37 -04:00
file(COPY ${PDB_GLOB} DESTINATION ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug)
vcpkg_copy_pdbs()