2020-05-16 07:39:54 +08:00
if ( EXISTS "${CURRENT_INSTALLED_DIR}/Media/HLMS/Blendfunctions_piece_fs.glslt" )
message ( FATAL_ERROR "FATAL ERROR: ogre-next and ogre are incompatible." )
endif ( )
2017-10-31 17:50:23 +08:00
2022-10-21 03:52:23 +08:00
if ( NOT VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_OSX )
2019-08-13 00:22:30 +08:00
message ( "${PORT} currently requires the following library from the system package manager:\n Xaw\n\nIt can be installed on Ubuntu systems via apt-get install libxaw7-dev" )
endif ( )
2022-10-14 02:58:22 +08:00
if ( VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_IOS OR VCPKG_TARGET_IS_EMSCRIPTEN )
vcpkg_check_linkage ( ONLY_STATIC_LIBRARY )
endif ( )
2018-03-02 22:11:58 +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 O G R E C a v e / o g r e
2023-02-17 02:05:47 +08:00
R E F " v $ { V E R S I O N } "
2024-03-20 04:06:43 +08:00
S H A 5 1 2 8 c 2 0 4 a a f 9 b e 4 e 6 c 8 f f c c c c 9 3 6 1 a 3 c d 7 9 6 2 a c 0 6 8 f c 2 d 8 8 7 5 5 c 2 9 8 3 c 8 2 1 0 7 6 4 2 7 b 3 b 0 1 9 7 d 2 a 3 0 f 7 2 6 3 6 c 2 e 3 5 a 8 6 b f b 8 9 e 4 3 e a 6 f 3 e f a e 6 b d 4 5 b 0 6 1 b b 6 4 b f c e a e 7 7 9
2018-03-02 22:11:58 +08:00
H E A D _ R E F m a s t e r
2017-11-08 22:50:49 +08:00
P A T C H E S
2023-10-18 01:46:25 +08:00
f i x - d e p e n d e n c i e s . p a t c h
c f g - r e l - p a t h s . p a t c h
s w i g - p y t h o n - p o l y f i l l . p a t c h
p k g c o n f i g . p a t c h
s a m e - i n s t a l l - r u l e s - a l l - p l a t f o r m s . p a t c h
2017-11-08 22:50:49 +08:00
)
[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
file ( REMOVE "${SOURCE_PATH}/CMake/Packages/FindOpenEXR.cmake" )
2022-10-14 02:58:22 +08:00
string ( COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" OGRE_STATIC )
string ( COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" OGRE_CONFIG_STATIC_LINK_CRT )
2017-10-31 17:50:23 +08:00
2020-05-16 07:39:54 +08:00
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
2023-10-18 01:46:25 +08:00
F E A T U R E S
a s s i m p O G R E _ B U I L D _ P L U G I N _ A S S I M P
a s s i m p C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ a s s i m p
b u l l e t O G R E _ B U I L D _ C O M P O N E N T _ B U L L E T
b u l l e t C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ B u l l e t
d 3 d 9 O G R E _ B U I L D _ R E N D E R S Y S T E M _ D 3 D 9
f r e e i m a g e O G R E _ B U I L D _ P L U G I N _ F R E E I M A G E
f r e e i m a g e C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ F r e e I m a g e
j a v a O G R E _ B U I L D _ C O M P O N E N T _ J A V A
o p e n e x r O G R E _ B U I L D _ P L U G I N _ E X R C O D E C
o p e n e x r C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ O p e n E X R
p y t h o n O G R E _ B U I L D _ C O M P O N E N T _ P Y T H O N
p y t h o n C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ P y t h o n 3
c s h a r p O G R E _ B U I L D _ C O M P O N E N T _ C S H A R P
o v e r l a y O G R E _ B U I L D _ C O M P O N E N T _ O V E R L A Y
z i p O G R E _ C O N F I G _ E N A B L E _ Z I P
s t r i c t O G R E _ R E S O U R C E M A N A G E R _ S T R I C T
t o o l s O G R E _ B U I L D _ T O O L S
t o o l s O G R E _ I N S T A L L _ T O O L S
I N V E R T E D _ F E A T U R E S
a s s i m p C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ a s s i m p
b u l l e t C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ B u l l e t
p y t h o n C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ P y t h o n 3
2020-05-16 07:39:54 +08:00
)
2019-08-13 00:22:30 +08:00
2023-07-22 00:04:10 +08:00
if ( "java" IN_LIST FEATURES OR "python" IN_LIST FEATURES OR "csharp" IN_LIST FEATURES )
list ( APPEND FEATURE_OPTIONS "-DCMAKE_REQUIRE_FIND_PACKAGE_SWIG=ON" )
2022-10-14 02:58:22 +08:00
vcpkg_find_acquire_program ( SWIG )
vcpkg_list ( APPEND FEATURE_OPTIONS "-DSWIG_EXECUTABLE=${SWIG}" )
endif ( )
2021-01-06 04:07:14 +08:00
# OGRE_RESOURCEMANAGER_STRICT need to be 0 for OFF and 1 for ON, because it is used 'as is' in sources
string ( REPLACE "OGRE_RESOURCEMANAGER_STRICT=ON" "OGRE_RESOURCEMANAGER_STRICT=1" FEATURE_OPTIONS "${FEATURE_OPTIONS}" )
string ( REPLACE "OGRE_RESOURCEMANAGER_STRICT=OFF" "OGRE_RESOURCEMANAGER_STRICT=0" FEATURE_OPTIONS "${FEATURE_OPTIONS}" )
2022-01-29 03:19:50 +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 } "
2017-10-31 17:50:23 +08:00
O P T I O N S
2022-02-24 03:57:13 +08:00
$ { F E A T U R E _ O P T I O N S }
2022-10-14 02:58:22 +08:00
- D O G R E _ C F G _ I N S T A L L _ P A T H = e t c / $ { P O R T }
- D O G R E _ C M A K E _ D I R = s h a r e / $ { P O R T }
- D O G R E _ M E D I A _ P A T H = s h a r e / $ { P O R T } / M e d i a
- D O G R E _ P L U G I N S _ P A T H = p l u g i n s / $ { P O R T }
2017-10-31 17:50:23 +08:00
- D O G R E _ B U I L D _ D E P E N D E N C I E S = O F F
2022-10-14 02:58:22 +08:00
- D O G R E _ B U I L D _ L I B S _ A S _ F R A M E W O R K S = O F F
2017-10-31 17:50:23 +08:00
- D O G R E _ B U I L D _ S A M P L E S = O F F
- D O G R E _ B U I L D _ T E S T S = O F F
- D O G R E _ B U I L D _ M S V C _ M P = O N
- D O G R E _ B U I L D _ M S V C _ Z M = O N
2022-10-14 02:58:22 +08:00
- D O G R E _ C O P Y _ D E P E N D E N C I E S = O F F
- D O G R E _ E N A B L E _ P R E C O M P I L E D _ H E A D E R S = O F F
2017-10-31 17:50:23 +08:00
- D O G R E _ I N S T A L L _ D E P E N D E N C I E S = O F F
- D O G R E _ I N S T A L L _ D O C S = O F F
- D O G R E _ I N S T A L L _ P D B = O F F
- D O G R E _ I N S T A L L _ S A M P L E S = O F F
- D O G R E _ I N S T A L L _ V S P R O P S = O F F
- D O G R E _ S T A T I C = $ { O G R E _ S T A T I C }
2022-10-14 02:58:22 +08:00
- D O G R E _ C O N F I G _ S T A T I C _ L I N K _ C R T = $ { O G R E _ C O N F I G _ S T A T I C _ L I N K _ C R T }
2017-11-22 16:40:31 +08:00
- D O G R E _ C O N F I G _ T H R E A D _ P R O V I D E R = s t d
2017-10-31 17:50:23 +08:00
- D O G R E _ B U I L D _ R E N D E R S Y S T E M _ D 3 D 1 1 = O N
- D O G R E _ B U I L D _ R E N D E R S Y S T E M _ G L = O N
- D O G R E _ B U I L D _ R E N D E R S Y S T E M _ G L 3 P L U S = O N
- D O G R E _ B U I L D _ R E N D E R S Y S T E M _ G L E S = O F F
- D O G R E _ B U I L D _ R E N D E R S Y S T E M _ G L E S 2 = O F F
2023-10-18 01:46:25 +08:00
- D C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ F R E E T Y P E = O N
- D C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ p u g i x m l = O N
2022-10-14 02:58:22 +08:00
- D C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ Z L I B = O N
- D C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ D o x y g e n = O N
2022-11-29 03:03:21 +08:00
- D C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ Q T = O N
2022-10-17 22:37:49 +08:00
- D C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ Q t 5 = O N
- D C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ Q t 6 = O N
2022-10-14 02:58:22 +08:00
O P T I O N S _ D E B U G
- D O G R E _ B U I L D _ T O O L S = O F F
- D O G R E _ I N S T A L L _ T O O L S = O F F
2022-06-24 06:40:59 +08:00
M A Y B E _ U N U S E D _ V A R I A B L E S
2022-11-29 03:03:21 +08:00
C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ Q t 5
C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ Q t 6
2022-10-14 02:58:22 +08:00
C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ O p e n E X R
O G R E _ C O P Y _ D E P E N D E N C I E S
O G R E _ B U I L D _ M S V C _ M P
O G R E _ B U I L D _ M S V C _ Z M
2022-06-24 06:40:59 +08:00
O G R E _ B U I L D _ R E N D E R S Y S T E M _ G L E S
2022-10-14 02:58:22 +08:00
O G R E _ I N S T A L L _ D E P E N D E N C I E S
O G R E _ I N S T A L L _ V S P R O P S
2016-12-19 06:00:35 +08:00
)
2022-01-29 03:19:50 +08:00
vcpkg_cmake_install ( )
2022-06-24 06:40:59 +08:00
vcpkg_copy_pdbs ( )
2022-01-29 03:19:50 +08:00
vcpkg_cmake_config_fixup ( )
2022-10-14 02:58:22 +08:00
vcpkg_fixup_pkgconfig ( )
2016-12-19 06:00:35 +08:00
2022-10-21 03:52:23 +08:00
2022-10-14 02:58:22 +08:00
if ( NOT VCPKG_BUILD_TYPE )
vcpkg_replace_string ( "${CURRENT_PACKAGES_DIR}/debug/etc/${PORT}/resources.cfg" "=../../share" "=../../../share" )
2024-06-20 05:07:05 +08:00
vcpkg_replace_string ( "${CURRENT_PACKAGES_DIR}/debug/etc/${PORT}/resources.cfg" "[Tests]\nFileSystem=${CURRENT_PACKAGES_DIR}/debug/Tests/Media" "" IGNORE_UNCHANGED )
vcpkg_replace_string ( "${CURRENT_PACKAGES_DIR}/share/${PORT}/OgreTargets-debug.cmake" "${_IMPORT_PREFIX}/plugins" "${_IMPORT_PREFIX}/debug/plugins" IGNORE_UNCHANGED )
[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
endif ( )
2024-06-20 05:07:05 +08:00
vcpkg_replace_string ( "${CURRENT_PACKAGES_DIR}/etc/${PORT}/resources.cfg" "[Tests]\nFileSystem=${CURRENT_PACKAGES_DIR}/Tests/Media" "" IGNORE_UNCHANGED )
2017-11-22 16:40:31 +08:00
2022-10-14 02:58:22 +08:00
file ( REMOVE_RECURSE
" $ { C U R R E N T _ P A C K A G E S _ D I R } / e t c / o g r e / s a m p l e s . c f g "
" $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / e t c / o g r e / s a m p l e s . c f g "
" $ { 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 "
)
2017-11-22 16:40:31 +08:00
2022-10-14 02:58:22 +08:00
set ( tools OgreMeshUpgrader OgreXMLConverter VRMLConverter )
if ( OGRE_BUILD_PLUGIN_ASSIMP )
list ( APPEND tools OgreAssimpConverter )
endif ( )
if ( OGRE_BUILD_TOOLS )
vcpkg_copy_tools ( TOOL_NAMES ${ tools } AUTO_CLEAN )
2017-11-22 16:40:31 +08:00
endif ( )
2019-08-13 00:22:30 +08:00
#Remove OgreMain*.lib from lib/ folder, because autolink would complain, since it defines a main symbol
#manual-link subfolder is here to the rescue!
2022-10-14 02:58:22 +08:00
if ( VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW )
2022-06-24 06:40:59 +08:00
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/manual-link" )
2022-02-24 03:57:13 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" )
2022-06-24 06:40:59 +08:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/lib/OgreMain.lib" "${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMain.lib" )
2022-02-24 03:57:13 +08:00
else ( )
2022-06-24 06:40:59 +08:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/lib/OgreMainStatic.lib" "${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMainStatic.lib" )
2018-11-29 01:47:15 +08:00
endif ( )
2022-02-24 03:57:13 +08:00
if ( NOT VCPKG_BUILD_TYPE )
2022-06-24 06:40:59 +08:00
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link" )
2018-11-29 01:47:15 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" )
2022-06-24 06:40:59 +08:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/OgreMain_d.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMain_d.lib" )
2018-11-29 01:47:15 +08:00
else ( )
2022-06-24 06:40:59 +08:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/OgreMainStatic_d.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMainStatic_d.lib" )
2018-11-29 01:47:15 +08:00
endif ( )
endif ( )
2022-06-24 06:40:59 +08:00
file ( GLOB SHARE_FILES "${CURRENT_PACKAGES_DIR}/share/ogre/*.cmake" )
2018-11-29 01:47:15 +08:00
foreach ( SHARE_FILE ${ SHARE_FILES } )
file ( READ "${SHARE_FILE}" _contents )
string ( REPLACE "lib/OgreMain" "lib/manual-link/OgreMain" _contents "${_contents}" )
file ( WRITE "${SHARE_FILE}" "${_contents}" )
endforeach ( )
endif ( )
2017-11-22 20:36:33 +08:00
2016-12-19 06:00:35 +08:00
# Handle copyright
2023-08-03 00:20:41 +08:00
vcpkg_install_copyright ( FILE_LIST "${SOURCE_PATH}/LICENSE" )