2021-07-08 00:26:06 +08:00
if ( VCPKG_TARGET_IS_LINUX )
message ( WARNING "${PORT} requires the following libraries from the system package manager:\n libxmu-dev\n libxi-dev\n libgl-dev\n\nThese can be installed on Ubuntu systems via apt-get install libxmu-dev libxi-dev libgl-dev." )
endif ( )
2019-10-08 01:35:13 +08:00
# Don't change to vcpkg_from_github! The sources in the git repository (archives) are missing some files that are distributed inside releases.
2019-03-31 13:18:23 +08:00
# More info: https://github.com/nigels-com/glew/issues/31 and https://github.com/nigels-com/glew/issues/13
2019-10-08 01:35:13 +08:00
vcpkg_download_distfile ( ARCHIVE
2018-02-14 13:10:11 +08:00
U R L S " h t t p s : / / g i t h u b . c o m / n i g e l s - c o m / g l e w / r e l e a s e s / d o w n l o a d / g l e w - 2 . 1 . 0 / g l e w - 2 . 1 . 0 . t g z "
2017-08-14 08:21:08 +08:00
F I L E N A M E " g l e w - 2 . 1 . 0 . t g z "
S H A 5 1 2 9 a 9 b 4 d 8 1 4 8 2 c c a a c 4 b 4 7 6 c 3 4 e d 5 3 7 5 8 5 a e 7 5 4 a 8 2 e b b 5 1 c 3 e f a 1 6 d 9 5 3 c 2 5 c c 3 9 3 1 b e 4 6 e d 2 e 4 9 e 7 9 c 7 3 0 c d 8 a f c 6 a 1 b 7 8 c 9 7 d 5 2 c d 7 1 4 0 4 4 a 3 3 9 c 3 b c 2 9 7 3 4 c d 4 d 2 a b
2016-09-19 11:50:08 +08:00
)
2019-10-08 01:35:13 +08:00
2019-06-13 06:44:25 +08:00
vcpkg_extract_source_archive_ex (
2019-10-08 01:35:13 +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
A R C H I V E $ { A R C H I V E }
2019-06-13 06:44:25 +08:00
R E F g l e w
P A T C H E S f i x - L N K 2 0 1 9 . p a t c h
)
2016-09-19 11:50:08 +08:00
2017-06-22 13:31:23 +08:00
vcpkg_configure_cmake (
S O U R C E _ P A T H $ { S O U R C E _ P A T H } / b u i l d / c m a k e
2019-08-01 04:01:02 +08:00
P R E F E R _ N I N J A
2019-04-06 00:38:26 +08:00
D I S A B L E _ P A R A L L E L _ C O N F I G U R E
2019-03-31 13:18:23 +08:00
O P T I O N S
- D B U I L D _ U T I L S = O F F
2019-10-08 01:35:13 +08:00
)
2016-09-19 11:50:08 +08:00
2017-06-22 13:31:23 +08:00
vcpkg_install_cmake ( )
[many ports] improvements for linux/wsl (#6730)
* [many ports] improve compatibility with WSL and mixed case filesystems
* [treehopper] express dependency on libusb, which was not working on non-win32 platforms and is still broken there
* [libharu] add compatibility with non-win32 platforms
* [geogram] fix openblas on linux
[clapack] better integration with linux environment
[visit-struct] put cmake config file in the expected folder
[geogram] remove trailing underscore to enable compatibility with OpenBLAS
* [openblas] playing with underscore, without success
* [openblas/lapack] fix library integration
* [clapack] improve target handling in cmake module
* [openblas] promote self-generated config to default cmake module, otherwise internal ones thinks wrongly that openblas can also solve lapack libs
* [clapack,openblas] improve libraries integration
* [many ports] fix cmake unnecessary target paths, wrong config paths, empty default dependencies, unnecessary [core] tags
* [suitesparse] improve integration with new lapack/openblas mechanism
* [suitesparse] add no underscore postfix also for linux
* [ceres] fix integration with newer openblas/lapack configs
* [aws-c-event-stream] fix regression
* [systemc] fix regression
* [libwebp,geogram] trigger rebuild
* [libwebp,pthread4w] fix regressions
* [glbinding] fix cmake module installation
* [globjects] disentangle unnecessary dependency from qt5
* [jasper] remove broken and unnecessary patches
* [libwebp] fix regression
* [many ports] avoid using BUILD_SHARED_LIBS which is uninitialized in port files
* [clapack] correctly find dlls
* [clapack] use a generic blas as dependency
* [fizz,g2o] restore expected version
* fix mistake
* [many ports] remove WIN32, APPLE and UNIX (again, they keep creeping in) from ports since they are broken and usually break non-win32 ports
* [libressl,openssl] do not try to build one if the other is already installed
* [itk] update ref and patch to avoid regression
* [libressl,openssl] implement full strategy to fix CI
* [libwebp] disable components that are broken on macOS
* [ogre] enable macOS build
* [freeimage,jxrlib,ogre,openexr,protobuf] port patches from #5169
* [ogre] add missing install command
* [ffmpeg] enable wrapper for cmake module
* [ffmpeg] add avresample module finder
* [ffmpeg] improve module detection and exported symbols
* [ffmpeg] add variables to cache
* [thrift] remove unnecessary build option
* [allegro5] fix shared/static inversion
* [protobuf] cleanup
* [libressl] cleanup
* [moos-core] cleanup
* commented features must not be separated from other features, otherwise vcpkg complains
* [itk] fix regression
* [shogun,itk] fix regressions
* [ogre] fix regression
* [opusfile] add compatibility with non-win32
* [itk] fix regression
* [sndfile,libsndfile] remove duplicate, redirect sndfile to libsndfile
* add missing dependencies
* [ismrmrd] fix regression
* [ffmpeg] trigger rebuild
* [clapack,openblas,libogg] fix regressions on macOS
* [libtins] fix regression
* force rebuild windows regressions, unable to reproduce locally
* [mosquitto] enable non-win32 builds
* [json-dto] force rebuild, unable to reproduce regression locally
* [many ports] uniform naming and path length requests
* fix regression
* fix regression
* [ffmpeg] fixes for downstream projects
* clean up - thanks to reviewers
* trigger rebuild of regressions on macOS
* trigger rebuild of regressions on macOS - part2
* Add core back
* Use VCPKG_CONCURRENCY
* Add core back to suitesparse
* Add core back to curl
* Add core back to magnum
* Add core back to magnum
* Add core back to magnum
* Add core back to cgal
2019-06-21 10:11:54 +08:00
vcpkg_fixup_cmake_targets ( CONFIG_PATH lib/cmake/glew )
2021-02-11 15:55:18 +08:00
# Skip check the required dependency opengl
vcpkg_fixup_pkgconfig ( SKIP_CHECK )
2016-09-19 11:50:08 +08:00
2020-07-31 13:37:02 +08:00
if ( VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW )
2018-03-20 03:31:32 +08:00
set ( _targets_cmake_files )
if ( NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug" )
list ( APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-debug.cmake" )
endif ( )
if ( NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release" )
list ( APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-release.cmake" )
endif ( )
foreach ( FILE ${ _targets_cmake_files } )
2017-06-22 14:25:57 +08:00
file ( READ ${ FILE } _contents )
string ( REPLACE "libglew32" "glew32" _contents "${_contents}" )
file ( WRITE ${ FILE } "${_contents}" )
endforeach ( )
if ( EXISTS ${ CURRENT_PACKAGES_DIR } /lib/libglew32.lib )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /lib/libglew32.lib ${ CURRENT_PACKAGES_DIR } /lib/glew32.lib )
2018-03-20 03:31:32 +08:00
endif ( )
if ( EXISTS ${ CURRENT_PACKAGES_DIR } /debug/lib/libglew32d.lib )
2017-06-22 14:25:57 +08:00
file ( RENAME ${ CURRENT_PACKAGES_DIR } /debug/lib/libglew32d.lib ${ CURRENT_PACKAGES_DIR } /debug/lib/glew32d.lib )
endif ( )
2020-02-12 09:30:03 +08:00
endif ( )
2016-09-22 13:48:10 +08:00
2017-06-22 14:25:57 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/bin )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /bin )
2017-09-25 20:48:34 +08:00
foreach ( FILE ${ CURRENT_PACKAGES_DIR } /include/GL/glew.h ${ CURRENT_PACKAGES_DIR } /include/GL/wglew.h ${ CURRENT_PACKAGES_DIR } /include/GL/glxew.h )
file ( READ ${ FILE } _contents )
string ( REPLACE "#ifdef GLEW_STATIC" "#if 1" _contents "${_contents}" )
file ( WRITE ${ FILE } "${_contents}" )
endforeach ( )
2017-06-22 14:25:57 +08:00
endif ( )
vcpkg_copy_pdbs ( )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/share )
2020-10-14 04:25:02 +08:00
file ( INSTALL ${ CMAKE_CURRENT_LIST_DIR } /vcpkg-cmake-wrapper.cmake DESTINATION ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } )
file ( INSTALL ${ SOURCE_PATH } /LICENSE.txt DESTINATION ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } RENAME copyright )
2017-11-17 15:54:55 +08:00
file ( COPY ${ CMAKE_CURRENT_LIST_DIR } /usage DESTINATION ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } )