2019-11-02 04:54:48 +08:00
if ( NOT VCPKG_TARGET_IS_WINDOWS )
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 ( )
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 - n e x t
2023-09-29 14:13:40 +08:00
R E F v $ { V E R S I O N }
2023-12-06 04:23:44 +08:00
S H A 5 1 2 5 2 e d 2 d 2 a 3 3 7 5 c 0 d 3 5 f 0 d c 6 9 5 b 9 8 6 5 1 4 4 8 4 a d 1 d 4 7 9 6 6 c 5 c 1 8 3 5 1 d 3 b 0 9 9 1 3 1 2 3 b 2 4 8 7 b 9 7 2 9 7 3 8 c 6 b 8 b 1 2 1 9 c 1 a 9 9 2 a 8 c 8 5 0 9 a 2 3 0 3 e 0 9 7 a 6 e b 2 6 4 9 7 e 1 5 2 a 1 4 d 4 8 8 3 0
2019-11-02 04:54:48 +08:00
H E A D _ R E F m a s t e r
P A T C H E S
t o o l c h a i n _ f i x e s . p a t c h
2023-08-31 04:44:54 +08:00
a v o i d - n a m e - c l a s h e s . p a t c h
f i x - e r r o r - c 2 0 3 9 . p a t c h
2023-10-18 05:57:01 +08:00
f i x - d e p e n d e n c i e s . p a t c h
2023-12-06 04:23:44 +08:00
o s x . p a t c h
2019-11-02 04:54:48 +08:00
)
if ( VCPKG_LIBRARY_LINKAGE STREQUAL static )
set ( OGRE_STATIC ON )
else ( )
set ( OGRE_STATIC OFF )
endif ( )
2023-09-29 14:13:40 +08:00
vcpkg_check_features (
O U T _ F E A T U R E _ O P T I O N S F E A T U R E _ O P T I O N S
F E A T U R E S
p l a n a r - r e f l e c t i o n s O G R E _ B U I L D _ C O M P O N E N T _ P L A N A R _ R E F L E C T I O N S
)
2022-04-01 01:58:32 +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 } "
2019-11-02 04:54:48 +08:00
O P T I O N S
2022-04-01 01:58:32 +08:00
$ { F E A T U R E _ O P T I O N S }
2023-12-06 04:23:44 +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
2022-04-01 01:58:32 +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
2023-08-31 04:44:54 +08:00
- D O G R E _ B U I L D _ S A M P L E S 2 = O F F
2019-11-02 04:54:48 +08:00
- 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 _ T O O L 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
- 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 _ T O O L 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 }
- 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
- 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
- D O G R E _ C M A K E _ D I R = s h a r e / o g r e - n e x t
2023-11-07 02:36:32 +08:00
- D O G R E _ U S E _ N E W _ P R O J E C T _ N A M E = O N
2019-11-02 04:54:48 +08:00
)
2022-04-01 01:58:32 +08:00
vcpkg_cmake_install ( )
vcpkg_copy_pdbs ( )
vcpkg_cmake_config_fixup ( )
2019-11-02 04:54:48 +08:00
2022-04-01 01:58:32 +08:00
file ( GLOB REL_CFGS "${CURRENT_PACKAGES_DIR}/bin/*.cfg" )
2019-11-02 04:54:48 +08:00
if ( REL_CFGS )
2022-04-01 01:58:32 +08:00
file ( COPY ${ REL_CFGS } DESTINATION "${CURRENT_PACKAGES_DIR}/lib" )
2019-11-02 04:54:48 +08:00
file ( REMOVE ${ REL_CFGS } )
endif ( )
2022-04-01 01:58:32 +08:00
file ( GLOB DBG_CFGS "${CURRENT_PACKAGES_DIR}/debug/bin/*.cfg" )
2019-11-02 04:54:48 +08:00
if ( DBG_CFGS )
2022-04-01 01:58:32 +08:00
file ( COPY ${ DBG_CFGS } DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" )
2019-11-02 04:54:48 +08:00
file ( REMOVE ${ DBG_CFGS } )
endif ( )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
2022-04-01 01:58:32 +08:00
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" )
2019-11-02 04:54:48 +08:00
endif ( )
2023-11-07 02:36:32 +08:00
#Remove OgreNextMain*.lib from lib/ folder, because autolink would complain, since it defines a main symbol
2019-11-02 04:54:48 +08:00
#manual-link subfolder is here to the rescue!
2020-05-16 07:39:54 +08:00
if ( VCPKG_TARGET_IS_WINDOWS )
2019-11-02 04:54:48 +08:00
if ( NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release" )
2022-04-01 01:58:32 +08:00
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/manual-link" )
2019-11-02 04:54:48 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" )
2023-11-07 02:36:32 +08:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/lib/release/OgreNextMain.lib" "${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreNextMain.lib" )
2019-11-02 04:54:48 +08:00
else ( )
2023-11-07 02:36:32 +08:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/lib/release/OgreNextMainStatic.lib" "${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreNextMainStatic.lib" )
2019-11-02 04:54:48 +08:00
endif ( )
2023-09-29 14:13:40 +08:00
file ( GLOB LIBS "${CURRENT_PACKAGES_DIR}/lib/release/*" )
file ( GLOB DLLS "${CURRENT_PACKAGES_DIR}/bin/release/*" )
file ( COPY ${ LIBS } DESTINATION "${CURRENT_PACKAGES_DIR}/lib" )
file ( COPY ${ DLLS } DESTINATION "${CURRENT_PACKAGES_DIR}/bin" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/release/" "${CURRENT_PACKAGES_DIR}/bin/release/" )
2019-11-02 04:54:48 +08:00
endif ( )
if ( NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Debug" )
2022-04-01 01:58:32 +08:00
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link" )
2019-11-02 04:54:48 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" )
2023-11-07 02:36:32 +08:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/debug/OgreNextMain_d.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreNextMain_d.lib" )
2019-11-02 04:54:48 +08:00
else ( )
2023-11-07 02:36:32 +08:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/debug/OgreNextMainStatic_d.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreNextMainStatic_d.lib" )
2019-11-02 04:54:48 +08:00
endif ( )
2023-09-29 14:13:40 +08:00
file ( GLOB LIBS "${CURRENT_PACKAGES_DIR}/debug/lib/debug/*" )
file ( GLOB DLLS "${CURRENT_PACKAGES_DIR}/debug/bin/debug/*" )
file ( COPY ${ LIBS } DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" )
file ( COPY ${ DLLS } DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/debug/" "${CURRENT_PACKAGES_DIR}/debug/bin/debug/" )
2019-11-02 04:54:48 +08:00
endif ( )
2022-04-01 01:58:32 +08:00
file ( GLOB SHARE_FILES "${CURRENT_PACKAGES_DIR}/share/ogre-next/*.cmake" )
2019-11-02 04:54:48 +08:00
foreach ( SHARE_FILE ${ SHARE_FILES } )
file ( READ "${SHARE_FILE}" _contents )
2023-11-07 02:36:32 +08:00
string ( REPLACE "lib/OgreNextMain" "lib/manual-link/OgreNextMain" _contents "${_contents}" )
2019-11-02 04:54:48 +08:00
file ( WRITE "${SHARE_FILE}" "${_contents}" )
endforeach ( )
endif ( )
# Handle copyright
2023-08-31 04:44:54 +08:00
vcpkg_install_copyright ( FILE_LIST "${SOURCE_PATH}/COPYING" )
2019-11-02 04:54:48 +08:00
2022-04-01 01:58:32 +08:00
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" )
2023-09-29 14:13:40 +08:00
2023-12-06 04:23:44 +08:00
if ( VCPKG_TARGET_IS_OSX )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/" )
if ( NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release" )
file ( GLOB LIBS "${CURRENT_PACKAGES_DIR}/lib/release/*" )
file ( GLOB DLLS "${CURRENT_PACKAGES_DIR}/bin/release/*" )
file ( COPY ${ LIBS } DESTINATION "${CURRENT_PACKAGES_DIR}/lib" )
file ( COPY ${ DLLS } DESTINATION "${CURRENT_PACKAGES_DIR}/bin" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/release/" "${CURRENT_PACKAGES_DIR}/bin/release/" )
endif ( )
if ( NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Debug" )
file ( GLOB LIBS "${CURRENT_PACKAGES_DIR}/debug/lib/debug/*" )
file ( GLOB DLLS "${CURRENT_PACKAGES_DIR}/debug/bin/debug/*" )
file ( COPY ${ LIBS } DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" )
file ( COPY ${ DLLS } DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/debug/" "${CURRENT_PACKAGES_DIR}/debug/bin/debug/" )
endif ( )
endif ( )
2023-09-29 14:13:40 +08:00
vcpkg_fixup_pkgconfig ( )