2022-04-06 02:14:30 +08:00
vcpkg_from_github (
2020-06-27 06:06:30 +08:00
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
2022-04-06 02:14:30 +08:00
R E P O F r e e G L U T P r o j e c t / f r e e g l u t
R E F v 3 . 2 . 2
S H A 5 1 2 c a a e d 8 a f 9 5 c 2 d 0 e c b c 7 8 5 2 2 9 e 2 6 4 3 3 9 7 8 a 0 f 6 0 6 a e 2 b 9 f 0 b 3 c d 7 9 4 b b 5 b b 7 0 a 1 c c 5 4 d 2 1 f 9 4 1 a 1 a 0 3 e 2 0 c 7 e 0 f a 3 e b a 9 d 5 4 a 2 1 d 6 e 2 3 e 4 4 f 2 4 3 8 9 9 c 0 f d f 1 4 6 0 6 6 c f 2 9
H E A D _ R E F m a s t e r
2020-06-27 06:06:30 +08:00
P A T C H E S
2022-04-06 02:14:30 +08:00
x 1 1 - d e p e n d e n c i e s - e x p o r t . p a t c h
2020-06-27 06:06:30 +08:00
m a c O S _ X q u a r t z . p a t c h
f i x - d e b u g - m a c r o . p a t c h
2021-04-10 01:09:10 +08:00
n o _ x 6 4 _ e n f o r c e m e n t . p a t c h
2022-04-06 02:14:30 +08:00
w i n d o w s - s t a t i c - o u t p u t - n a m e . p a t c h
2019-05-09 04:47:32 +08:00
)
2016-10-11 16:27:49 +08:00
2020-05-22 02:29:52 +08:00
if ( NOT VCPKG_TARGET_IS_WINDOWS )
2019-05-10 02:45:23 +08:00
message ( "Freeglut currently requires the following libraries from the system package manager:\n opengl\n glu\n libx11\n xrandr\n xi\n xxf86vm\n\nThese can be installed on Ubuntu systems via apt-get install libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev\nOn macOS Xquartz is required." )
2018-04-27 18:15:17 +08:00
endif ( )
2022-04-06 02:14:30 +08:00
string ( COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" FREEGLUT_STATIC )
string ( COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" FREEGLUT_DYNAMIC )
2018-09-07 20:24:27 +08:00
2022-04-06 02:14:30 +08:00
vcpkg_cmake_configure (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
2016-10-11 16:27:49 +08:00
O P T I O N S
2016-11-16 09:39:33 +08:00
- D F R E E G L U T _ B U I L D _ S T A T I C _ L I B S = $ { F R E E G L U T _ S T A T I C }
- D F R E E G L U T _ B U I L D _ S H A R E D _ L I B S = $ { F R E E G L U T _ D Y N A M I C }
2016-10-11 16:27:49 +08:00
- D F R E E G L U T _ B U I L D _ D E M O S = O F F
2016-11-16 09:39:33 +08:00
- D I N S T A L L _ P D B = O F F # Installing pdbs failed on debug static. So, disable it and let vcpkg_copy_pdbs() do it
2016-10-11 16:27:49 +08:00
)
2022-04-06 02:14:30 +08:00
vcpkg_cmake_install ( )
vcpkg_copy_pdbs ( )
vcpkg_cmake_config_fixup ( CONFIG_PATH lib/cmake/FreeGLUT )
vcpkg_fixup_pkgconfig ( )
2016-10-11 16:27:49 +08:00
2017-11-08 21:55:46 +08:00
# Rename static lib (otherwise it's incompatible with FindGLUT.cmake)
2018-04-27 18:15:17 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
2020-01-23 04:19:17 +08:00
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 / G L / f r e e g l u t _ s t d . h "
" i f d e f F R E E G L U T _ S T A T I C "
" i f 1 / / i f d e f F R E E G L U T _ S T A T I C "
)
2017-11-08 21:55:46 +08:00
endif ( )
2017-07-01 05:38:26 +08:00
# Clean
2016-10-11 16:27:49 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include )
2022-04-06 02:14:30 +08:00
file ( INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/glut" )
2016-11-16 09:39:33 +08:00
2022-04-06 02:14:30 +08:00
file ( INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" )
file ( INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )