2020-03-13 08:52:45 +08:00
if ( VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX )
2019-05-20 08:43:29 +08:00
message (
" r a y l i b c u r r e n t l y r e q u i r e s t h e f o l l o w i n g l i b r a r i e s f r o m t h e s y s t e m p a c k a g e m a n a g e r :
l i b g l 1 - m e s a - d e v
l i b x 1 1 - d e v
l i b x c u r s o r - d e v
l i b x i n e r a m a - d e v
l i b x r a n d r - d e v
T h e s e c a n b e i n s t a l l e d o n U b u n t u s y s t e m s v i a s u d o a p t i n s t a l l l i b g l 1 - m e s a - d e v l i b x 1 1 - d e v l i b x c u r s o r - d e v l i b x i n e r a m a - d e v l i b x r a n d r - d e v "
)
endif ( )
2022-03-12 03:21:42 +08:00
if ( VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX )
set ( patches fix-linkGlfw.patch )
endif ( )
2022-12-29 05:52:08 +08:00
if ( VCPKG_TARGET_IS_EMSCRIPTEN )
2023-04-21 07:02:16 +08:00
set ( ADDITIONAL_OPTIONS "-DPLATFORM=Web" )
2022-12-29 05:52:08 +08:00
endif ( )
2019-05-20 08:43:29 +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 r a y s a n 5 / r a y l i b
2023-04-21 07:02:16 +08:00
R E F " $ { V E R S I O N } "
2023-03-20 15:17:43 +08:00
S H A 5 1 2 a 9 5 9 a b b b 5 7 7 a 8 9 5 1 2 5 1 a 4 6 9 d 6 5 0 5 0 9 3 f d 2 0 9 8 8 4 4 4 d c f 0 5 5 e 2 6 c b 0 b 4 8 4 e f 4 0 2 4 2 1 1 b 2 c c a 4 5 1 8 7 a c c b d 4 6 5 c 5 6 b c 5 0 e 0 2 d 4 5 0 b 6 f 7 f 7 c f d e 2 c d a e d c d c e 4 2 2 f 8 0 d c b c
2019-05-20 08:43:29 +08:00
H E A D _ R E F m a s t e r
2023-04-21 07:02:16 +08:00
P A T C H E S
f i x - p r o j e c t - v e r s i o n . p a t c h #Upstream change https://github.com/raysan5/raylib/commit/0d4db7ad7f6fd442ed165ebf8ab8b3f4033b04e7, please remove in next update.
$ { p a t c h e s }
2019-05-20 08:43:29 +08:00
)
string ( COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED )
string ( COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC )
2020-03-13 08:52:45 +08:00
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
2020-08-11 00:33:50 +08:00
F E A T U R E S
h i d p i S U P P O R T _ H I G H _ D P I
u s e - a u d i o U S E _ A U D I O
2020-03-13 08:52:45 +08:00
)
2019-05-20 08:43:29 +08:00
2021-06-16 02:53:40 +08:00
if ( VCPKG_TARGET_IS_MINGW )
set ( DEBUG_ENABLE_SANITIZERS OFF )
else ( )
set ( DEBUG_ENABLE_SANITIZERS ON )
endif ( )
2021-11-09 13:06:51 +08:00
vcpkg_cmake_configure (
2022-03-12 03:21:42 +08:00
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
2019-05-20 08:43:29 +08:00
O P T I O N S
- D B U I L D _ E X A M P L E S = O F F
- D S H A R E D = $ { S H A R E D }
- D S T A T I C = $ { S T A T I C }
- D U S E _ E X T E R N A L _ G L F W = O F F # externl glfw3 causes build errors on Windows
2020-08-08 07:17:24 +08:00
$ { F E A T U R E _ O P T I O N S }
2022-12-29 05:52:08 +08:00
$ { A D D I T I O N A L _ O P T I O N S }
2019-05-20 08:43:29 +08:00
O P T I O N S _ D E B U G
2021-06-16 02:53:40 +08:00
- D E N A B L E _ A S A N = $ { D E B U G _ E N A B L E _ S A N I T I Z E R S }
- D E N A B L E _ U B S A N = $ { D E B U G _ E N A B L E _ S A N I T I Z E R S }
2019-05-20 08:43:29 +08:00
- D E N A B L E _ M S A N = O F F
O P T I O N S _ R E L E A S E
- D E N A B L E _ A S A N = O F F
- D E N A B L E _ U B S A N = O F F
- D E N A B L E _ M S A N = O F F
2023-04-21 07:02:16 +08:00
M A Y B E _ U N U S E D _ V A R I A B L E S
S H A R E D
S T A T I C
S U P P O R T _ H I G H _ D P I
2019-05-20 08:43:29 +08:00
)
2021-11-09 13:06:51 +08:00
vcpkg_cmake_install ( )
2019-05-20 08:43:29 +08:00
vcpkg_copy_pdbs ( )
2021-11-09 13:06:51 +08:00
vcpkg_cmake_config_fixup ( CONFIG_PATH lib/cmake/ ${ PORT } )
2022-02-01 11:38:58 +08:00
vcpkg_fixup_pkgconfig ( )
2021-02-02 11:26:35 +08:00
2019-05-20 08:43:29 +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
)
if ( VCPKG_LIBRARY_LINKAGE STREQUAL dynamic )
vcpkg_replace_string (
$ { C U R R E N T _ P A C K A G E S _ D I R } / i n c l u d e / r a y l i b . h
" defined ( USE_LIBTYPE_SHARED ) "
" 1 / / defined ( USE_LIBTYPE_SHARED ) "
)
endif ( )
2023-04-21 07:02:16 +08:00
vcpkg_install_copyright ( FILE_LIST "${SOURCE_PATH}/LICENSE" )