2017-07-15 07:46:45 +08: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-08-22 05:52:09 +08:00
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-e8b209bc20a60224859eb8a0cae082bd20d32ed1)
|
2017-07-21 05:25:17 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
REPO liballeg/allegro5
|
2017-08-22 05:52:09 +08:00
|
|
|
REF e8b209bc20a60224859eb8a0cae082bd20d32ed1
|
|
|
|
SHA512 50b30d4b539bd4a2488d2b33e9fbfc6fdfd340039d9086993a5719bab3cb020ee6fe7f6d3578755a52c8aab9816d25cd74710ce93b0b374a2f97620b6138419d
|
2017-07-21 05:25:17 +08:00
|
|
|
HEAD_REF master
|
2017-07-15 07:46:45 +08:00
|
|
|
)
|
|
|
|
|
2017-07-16 01:56:02 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
2017-08-22 05:52:09 +08:00
|
|
|
set(ALLEGRO_USE_STATIC ON)
|
2017-07-16 01:56:02 +08:00
|
|
|
else()
|
2017-08-22 05:52:09 +08:00
|
|
|
set(ALLEGRO_USE_STATIC OFF)
|
2017-07-16 01:56:02 +08:00
|
|
|
endif()
|
2017-07-21 07:32:22 +08:00
|
|
|
|
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PATCHES
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/fix-pdb-install.patch
|
|
|
|
)
|
|
|
|
|
2017-07-15 07:46:45 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
2017-07-15 11:45:50 +08:00
|
|
|
OPTIONS
|
|
|
|
-DWANT_DOCS=OFF
|
|
|
|
-DALLEGRO_SDL=OFF
|
|
|
|
-DWANT_DEMO=OFF
|
2017-08-22 05:52:09 +08:00
|
|
|
-DSHARED=${ALLEGRO_USE_STATIC}
|
2017-07-15 11:45:50 +08:00
|
|
|
-DWANT_EXAMPLES=OFF
|
|
|
|
-DWANT_CURL_EXAMPLE=OFF
|
|
|
|
-DWANT_TESTS=OFF
|
|
|
|
-DWANT_AUDIO=ON
|
|
|
|
-DWANT_COLOR=ON
|
|
|
|
-DWANT_D3D=ON
|
2017-07-15 12:46:09 +08:00
|
|
|
-DWANT_D3D9EX=OFF # Not available on vcpkg
|
2017-07-15 11:45:50 +08:00
|
|
|
-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
|
2017-07-15 12:39:27 +08:00
|
|
|
-DWANT_MODAUDIO=OFF # Not available on vcpkg right now
|
2017-07-15 11:45:50 +08:00
|
|
|
-DWANT_NATIVE_DIALOG=ON
|
|
|
|
-DWANT_NATIVE_IMAGE_LOADER=ON
|
|
|
|
-DWANT_OGG_VIDEO=ON
|
|
|
|
-DWANT_OPENAL=ON
|
|
|
|
-DWANT_OPENGL=ON
|
2017-07-15 12:08:54 +08:00
|
|
|
-DWANT_OPENSL=OFF # Not yet available on vcpkg
|
2017-08-22 05:52:09 +08:00
|
|
|
-DWANT_OPUS=ON
|
2017-07-15 11:45:50 +08:00
|
|
|
-DWANT_PHYSFS=ON
|
|
|
|
-DWANT_POPUP_EXAMPLES=OFF
|
|
|
|
-DWANT_PRIMITIVES=ON
|
|
|
|
-DWANT_RELEASE_LOGGING=OFF
|
|
|
|
-DWANT_SHADERS_D3D=ON
|
|
|
|
-DWANT_SHADERS_GL=ON
|
2017-07-15 12:08:54 +08:00
|
|
|
-DWANT_TREMOR=OFF # Not yet available on vcpkg
|
2017-07-15 11:45:50 +08:00
|
|
|
-DWANT_TTF=ON
|
|
|
|
-DWANT_VIDEO=ON
|
|
|
|
-DWANT_VORBIS=ON
|
2017-07-15 12:49:19 +08:00
|
|
|
-DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/AL
|
2017-07-15 12:09:06 +08:00
|
|
|
-DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
|
2017-07-15 07:46:45 +08:00
|
|
|
OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON
|
2017-08-22 05:59:31 +08:00
|
|
|
OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF
|
2017-07-15 07:46:45 +08: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)
|
|
|
|
|
2017-07-15 22:45:14 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
2017-07-15 23:47:50 +08:00
|
|
|
file(GLOB PDB_GLOB ${CURRENT_BUILDTREES_DIR}-dbg/lib/*.pdb)
|
2017-07-21 04:37:30 +08:00
|
|
|
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug)
|
2017-07-15 23:00:37 +08:00
|
|
|
file(COPY ${PDB_GLOB} DESTINATION ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug)
|
|
|
|
|
2017-07-15 22:45:14 +08:00
|
|
|
vcpkg_copy_pdbs()
|