2024-11-07 23:36:47 +08:00
vcpkg_from_github (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O l i b s d l - o r g / S D L
R E F " p r e v i e w - 3 . 1 . 6 "
S H A 5 1 2 a 0 c a 7 2 6 3 c d 2 f 1 b 8 8 3 8 2 9 c 3 9 a e 0 e e 2 e a 1 8 d 8 1 4 f 8 d d e 7 6 8 c 8 b e 9 a 4 9 4 8 7 1 9 3 b c 8 5 6 b b 4 5 8 7 0 7 6 4 f d 7 0 1 6 9 e 7 5 d 2 e c 8 0 4 5 7 e 5 b 4 5 8 1 1 c 0 7 a 9 2 6 4 7 9 f 1 a c 4 f 9 d 3 1 5 7 f 4 0 a 4
H E A D _ R E F m a i n
)
string ( COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC )
string ( COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SDL_SHARED )
string ( COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" FORCE_STATIC_VCRT )
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
F E A T U R E S
a l s a S D L _ A L S A
i b u s S D L _ I B U S
v u l k a n S D L _ V U L K A N
w a y l a n d S D L _ W A Y L A N D
x 1 1 S D L _ X 1 1
)
if ( "x11" IN_LIST FEATURES )
message ( WARNING "You will need to install Xorg dependencies to use feature x11:\nsudo apt install libx11-dev libxft-dev libxext-dev\n" )
endif ( )
if ( "wayland" IN_LIST FEATURES )
message ( WARNING "You will need to install Wayland dependencies to use feature wayland:\nsudo apt install libwayland-dev libxkbcommon-dev libegl1-mesa-dev\n" )
endif ( )
if ( "ibus" IN_LIST FEATURES )
message ( WARNING "You will need to install ibus dependencies to use feature ibus:\nsudo apt install libibus-1.0-dev\n" )
endif ( )
vcpkg_cmake_configure (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
O P T I O N S
$ { F E A T U R E _ O P T I O N S }
- D S D L _ S T A T I C = $ { S D L _ S T A T I C }
- D S D L _ S H A R E D = $ { S D L _ S H A R E D }
- D S D L _ F O R C E _ S T A T I C _ V C R T = $ { F O R C E _ S T A T I C _ V C R T }
- D S D L _ L I B C = O N
- D S D L _ T E S T _ L I B R A R Y = O F F
- D S D L _ T E S T S = O F F
2024-11-11 16:26:11 +08:00
- D S D L _ I N S T A L L _ C M A K E D I R _ R O O T = s h a r e / $ { P O R T }
# Specifying the revision skips the need to use git to determine a version
- D S D L _ R E V I S I O N = v c p k g
- D C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ L i b U S B = 1
2024-11-07 23:36:47 +08:00
M A Y B E _ U N U S E D _ V A R I A B L E S
S D L _ F O R C E _ S T A T I C _ V C R T
)
vcpkg_cmake_install ( )
2024-11-19 08:50:22 +08:00
# Subject to https://github.com/libsdl-org/SDL/pull/11492
set ( config_path "share/${PORT}/SDL3" )
if ( VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW )
set ( config_path "share/${PORT}" )
endif ( )
vcpkg_cmake_config_fixup ( CONFIG_PATH "${config_path}" )
2024-11-07 23:36:47 +08:00
file ( REMOVE_RECURSE
" $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / i n c l u d e "
" $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / s h a r e "
)
vcpkg_copy_pdbs ( )
vcpkg_fixup_pkgconfig ( )
file ( INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" )
2024-11-11 16:26:11 +08:00
vcpkg_install_copyright ( FILE_LIST "${SOURCE_PATH}/LICENSE.txt"
C O M M E N T " S o m e c o n f i g u r a t i o n s m a y u s e c o d e l i c e n s e d u n d e r t h e M I T a n d A p a c h e - 2 . 0 l i c e n s e s . "
)