2018-11-09 21:41:16 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Dav1dde/glad
|
2019-06-09 09:33:20 +08:00
|
|
|
REF v0.1.30
|
|
|
|
SHA512 2db0f75e5859be039bf4dcbea239dd6d35bdc92e69912e807dfacdb01581c73b6a5eb0f0889f2ffcd705415abe5f28cf204b4010d08f5477b51c0ce3ae6a35b5
|
2018-11-09 21:41:16 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2019-02-08 07:28:50 +08:00
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
|
|
|
vcpkg_add_to_path("${PYTHON3_DIR}")
|
2018-11-17 10:19:03 +08:00
|
|
|
|
|
|
|
file(COPY
|
|
|
|
${CURRENT_INSTALLED_DIR}/include/KHR/khrplatform.h
|
|
|
|
${CURRENT_INSTALLED_DIR}/share/egl-registry/egl.xml
|
|
|
|
${CURRENT_INSTALLED_DIR}/share/opengl-registry/gl.xml
|
|
|
|
${CURRENT_INSTALLED_DIR}/share/opengl-registry/glx.xml
|
|
|
|
${CURRENT_INSTALLED_DIR}/share/opengl-registry/wgl.xml
|
|
|
|
DESTINATION ${SOURCE_PATH}/glad/files
|
|
|
|
)
|
2018-11-14 07:02:29 +08:00
|
|
|
|
2018-11-09 21:41:16 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DGLAD_NO_LOADER=OFF
|
|
|
|
-DGLAD_EXPORT=OFF
|
|
|
|
-DGLAD_INSTALL=ON
|
|
|
|
-DGLAD_REPRODUCIBLE=ON
|
|
|
|
-DGLAD_SPEC="gl" # {gl,egl,glx,wgl}
|
|
|
|
-DGLAD_PROFILE="compatibility" # {core,compatibility}
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DGLAD_GENERATOR="c-debug"
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glad)
|
|
|
|
|
2018-11-17 10:19:03 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/KHR)
|
2018-11-09 21:41:16 +08:00
|
|
|
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/glad/copyright COPYONLY)
|