2022-05-12 07:48:04 +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 A c a d e m y S o f t w a r e F o u n d a t i o n / M a t e r i a l X
2024-01-24 03:56:29 +08:00
R E F " v $ { V E R S I O N } "
2024-10-29 15:05:25 +08:00
S H A 5 1 2 c a 7 4 3 e 6 1 9 f 5 1 b d d d 6 7 4 1 9 c 7 9 a 3 1 e 9 f b 9 2 d d 7 8 8 3 e 8 c 1 8 2 8 9 7 c 1 d 8 c e a 2 e 5 d c 5 1 c d d f 1 3 a c 8 c c 7 9 8 c f a 0 f 0 2 2 d a c f 4 f d 7 7 8 8 1 a e f c 2 4 f 3 1 8 4 f 8 b 7 2 7 3 6 5 1 b a 5 5 c 7 d f 4 0 0
2022-05-12 07:48:04 +08:00
H E A D _ R E F m a i n
)
2024-01-24 03:56:29 +08:00
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
F E A T U R E S
g l s l - g e n e r a t o r M A T E R I A L X _ B U I L D _ G E N _ G L S L
m d l - g e n e r a t o r M A T E R I A L X _ B U I L D _ G E N _ M D L
o s l - g e n e r a t o r M A T E R I A L X _ B U I L D _ G E N _ O S L
r e n d e r M A T E R I A L X _ B U I L D _ R E N D E R
)
if ( ( VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_LINUX ) AND MATERIALX_BUILD_RENDER )
message ( WARNING "${PORT} currently requires the following libraries from the system package manager:\n libx11-dev\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev." )
endif ( )
2022-05-12 07:48:04 +08:00
string ( COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" OPTION_BUILD_SHARED_LIB )
vcpkg_cmake_configure (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
2024-01-24 03:56:29 +08:00
O P T I O N S $ { F E A T U R E _ O P T I O N S }
2022-05-12 07:48:04 +08:00
" - D M A T E R I A L X _ B U I L D _ S H A R E D _ L I B S : B O O L = $ { O P T I O N _ B U I L D _ S H A R E D _ L I B } "
" - D M A T E R I A L X _ B U I L D _ J S : B O O L = N O "
" - D M A T E R I A L X _ B U I L D _ P Y T H O N : B O O L = N O "
" - D M A T E R I A L X _ B U I L D _ V I E W E R : B O O L = N O "
" - D M A T E R I A L X _ B U I L D _ D O C S : B O O L = N O "
" - D M A T E R I A L X _ B U I L D _ O I I O : B O O L = N O "
" - D M A T E R I A L X _ B U I L D _ T E S T S : B O O L = N O "
" - D M A T E R I A L X _ P Y T H O N _ L T O : B O O L = N O "
" - D M A T E R I A L X _ I N S T A L L _ P Y T H O N : B O O L = N O "
" - D M A T E R I A L X _ T E S T _ R E N D E R : B O O L = N O "
" - D M A T E R I A L X _ W A R N I N G S _ A S _ E R R O R S : B O O L = N O "
M A Y B E _ U N U S E D _ V A R I A B L E S
M A T E R I A L X _ P Y T H O N _ L T O # Used when MATERIALX_BUILD_PYTHON=ON
)
vcpkg_cmake_install ( )
vcpkg_copy_pdbs ( )
vcpkg_cmake_config_fixup ( PACKAGE_NAME MaterialX CONFIG_PATH lib/cmake/MaterialX )
file ( REMOVE_RECURSE
" $ { C U R R E N T _ P A C K A G E S _ D I R } / C H A N G E L O G . m d "
" $ { C U R R E N T _ P A C K A G E S _ D I R } / L I C E N S E "
" $ { C U R R E N T _ P A C K A G E S _ D I R } / R E A D M E . m d "
" $ { C U R R E N T _ P A C K A G E S _ D I R } / T H I R D - P A R T Y . m d "
" $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / C H A N G E L O G . m d "
" $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / L I C E N S E "
" $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / R E A D M E . m d "
" $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / T H I R D - P A R T Y . m d "
2024-01-24 03:56:29 +08:00
" $ { 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 "
# MaterialXGenShader explicitely install resources
" $ { C U R R E N T _ P A C K A G E S _ D I R } / r e s o u r c e s "
" $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / r e s o u r c e s "
" $ { 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 / M a t e r i a l X R e n d e r / E x t e r n a l / O p e n I m a g e I O "
# Based on how OSL does it, it could be that those `.mdl` source would be better located inside `libraries/pbrlib/genmdl/**`
# But it seems that they are instead installed into `libraries/mdl`
" $ { 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 / M a t e r i a l X G e n M d l / m d l "
)
2022-05-12 07:48:04 +08:00
2024-01-24 03:56:29 +08:00
vcpkg_install_copyright ( FILE_LIST "${SOURCE_PATH}/LICENSE" )