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 } "
S H A 5 1 2 d 4 0 2 2 a 4 5 4 e 0 6 4 9 a 0 1 1 8 2 5 4 5 f 2 4 0 9 4 b a 1 f 7 2 1 2 7 0 9 9 a 9 b 0 9 6 e 1 b 4 3 8 2 3 8 6 5 9 6 2 9 e 9 3 b 1 d 7 9 2 7 7 d 0 2 a c c 0 a c e e b d c 3 9 6 9 a a b 0 0 3 1 d e 7 f 8 6 3 9 0 0 7 7 b a f c 6 6 c c f d 8 6 7 5 5 4 3 0
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
2022-10-14 02:58:22 +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
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
2022-01-29 03:19:50 +08:00
F E A T U R E S
2022-10-14 02:58:22 +08:00
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
2022-10-17 22:37:49 +08:00
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
2021-01-06 04:07:14 +08:00
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
2022-10-14 02:58:22 +08:00
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
2021-01-06 04:07:14 +08:00
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
2022-10-14 02:58:22 +08:00
j a v a C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ S W I G
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
2021-01-06 04:07:14 +08:00
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
2022-10-14 02:58:22 +08:00
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
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 _ S W I G
2022-02-24 03:57:13 +08:00
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
2022-10-14 02:58:22 +08:00
c s h a r p C M A K E _ R E Q U I R E _ F I N D _ P A C K A G E _ S W I G
2021-01-06 04:07:14 +08:00
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
2022-10-14 02:58:22 +08:00
o v e r l a y 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
z i p O G R E _ C O N F I G _ E N A B L E _ Z I P
2021-01-06 04:07:14 +08:00
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
2022-10-14 02:58:22 +08:00
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
2020-05-16 07:39:54 +08:00
)
2019-08-13 00:22:30 +08:00
2022-10-14 02:58:22 +08:00
if ( CMAKE_REQUIRE_FIND_PACKAGE_SWIG )
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
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" )
2022-10-21 03:52:23 +08:00
vcpkg_replace_string ( "${CURRENT_PACKAGES_DIR}/debug/etc/${PORT}/resources.cfg" "[Tests]\nFileSystem=${CURRENT_PACKAGES_DIR}/debug/Tests/Media" "" )
2022-10-14 02:58:22 +08:00
vcpkg_replace_string ( "${CURRENT_PACKAGES_DIR}/share/${PORT}/OgreTargets-debug.cmake" "${_IMPORT_PREFIX}/plugins" "${_IMPORT_PREFIX}/debug/plugins" )
[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 ( )
2022-10-21 03:52:23 +08:00
vcpkg_replace_string ( "${CURRENT_PACKAGES_DIR}/etc/${PORT}/resources.cfg" "[Tests]\nFileSystem=${CURRENT_PACKAGES_DIR}/Tests/Media" "" )
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
2022-06-24 06:40:59 +08:00
file ( INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )