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-03-12 04:09:25 +08:00
S H A 5 1 2 e 5 2 7 c 2 d 1 6 0 5 0 2 b 7 9 e d c 3 3 e 8 0 1 3 5 1 d 2 d 4 0 b 6 4 1 9 b 8 5 3 a a 6 b 3 e 8 c 4 a 5 4 7 8 7 0 0 6 b a e d 2 3 6 8 2 9 e c 8 e 4 d b 3 2 4 6 9 d a f f e c 8 b c 1 a a 1 b a 3 5 5 8 8 a 4 9 d 4 1 4 f b 3 8 f e e e 3 6 f a c 7 e 3 f b 7
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 _ G E N _ G L S L : B O O L = N O "
" - D M A T E R I A L X _ B U I L D _ G E N _ O S L : B O O L = N O "
" - D M A T E R I A L X _ B U I L D _ G E N _ M D L : B O O L = N O "
" - D M A T E R I A L X _ B U I L D _ R E N D E R : 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" )