@ -38,9 +38,13 @@ option(YUZU_USE_BUNDLED_OPUS "Compile bundled opus" ON)
option ( YUZU_TESTS "Compile tests" ON )
option ( YUZU_TESTS "Compile tests" ON )
option ( YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" OFF )
option ( YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}" )
if ( YUZU_USE_BUNDLED_VCPKG )
if ( YUZU_USE_BUNDLED_VCPKG )
if ( YUZU_TESTS )
list ( APPEND VCPKG_MANIFEST_FEATURES "yuzu-tests" )
endif ( )
include ( ${ CMAKE_SOURCE_DIR } /externals/vcpkg/scripts/buildsystems/vcpkg.cmake )
include ( ${ CMAKE_SOURCE_DIR } /externals/vcpkg/scripts/buildsystems/vcpkg.cmake )
elseif ( NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "" )
elseif ( NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "" )
# D i s a b l e m a n i f e s t mode ( use vcpkg classic mode ) w h e n u s i n g a c u s t o m v c p k g i n s t a l l a t i o n
# D i s a b l e m a n i f e s t mode ( use vcpkg classic mode ) w h e n u s i n g a c u s t o m v c p k g i n s t a l l a t i o n
@ -160,7 +164,6 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
find_package ( fmt 8.0.1 REQUIRED CONFIG )
find_package ( fmt 8.0.1 REQUIRED CONFIG )
find_package ( lz4 1.8 REQUIRED )
find_package ( nlohmann_json 3.8 REQUIRED CONFIG )
find_package ( nlohmann_json 3.8 REQUIRED CONFIG )
find_package ( ZLIB 1.2 REQUIRED )
find_package ( ZLIB 1.2 REQUIRED )
@ -170,6 +173,12 @@ if (NOT zstd_FOUND)
find_package ( zstd 1.5 REQUIRED )
find_package ( zstd 1.5 REQUIRED )
endif ( )
endif ( )
# l z 4 1 . 8 i s r e q u i r e d , b u t v c p k g ' s l z 4 - c o n f i g . c m a k e d o e s n o t h a v e v e r s i o n i n f o
find_package ( lz4 CONFIG )
if ( NOT lz4_FOUND )
find_package ( lz4 1.8 REQUIRED )
endif ( )
if ( YUZU_TESTS )
if ( YUZU_TESTS )
find_package ( Catch2 2.13.7 REQUIRED CONFIG )
find_package ( Catch2 2.13.7 REQUIRED CONFIG )
endif ( )
endif ( )
@ -355,16 +364,10 @@ if (ENABLE_SDL2)
endif ( )
endif ( )
endif ( )
endif ( )
# TODO ( lat9nq ) : D e t e r m i n e w h a t i f a n y o f t h i s w e s t i l l n e e d
# R e e x p o r t s o m e t a r g e t s t h a t a r e n a m e d d i f f e r e n t l y w h e n u s i n g t h e u p s t r e a m C m a k e C o n f i g
#
# R e e x p o r t s o m e t a r g e t s t h a t a r e n a m e d d i f f e r e n t l y w h e n u s i n g t h e u p s t r e a m C m a k e C o n f i g v s t h e g e n e r a t e d C o n a n c o n f i g
# I n o r d e r t o A L I A S t a r g e t s t o a n e w n a m e , t h e y f i r s t n e e d t o b e I M P O R T E D _ G L O B A L
# I n o r d e r t o A L I A S t a r g e t s t o a n e w n a m e , t h e y f i r s t n e e d t o b e I M P O R T E D _ G L O B A L
# D y n a r m i c c h e c k s f o r t a r g e t ` b o o s t ` a n d s o w e w a n t t o m a k e s u r e i t c a n f i n d i t t h r o u g h o u r s y s t e m i n s t e a d o f u s i n g t h e i r e x t e r n a l
# D y n a r m i c c h e c k s f o r t a r g e t ` b o o s t ` a n d s o w e w a n t t o m a k e s u r e i t c a n f i n d i t t h r o u g h o u r s y s t e m i n s t e a d o f u s i n g t h e i r e x t e r n a l
if ( TARGET Boost::Boost )
if ( TARGET Boost::boost )
set_target_properties ( Boost::Boost PROPERTIES IMPORTED_GLOBAL TRUE )
add_library ( Boost::boost ALIAS Boost::Boost )
add_library ( boost ALIAS Boost::Boost )
elseif ( TARGET Boost::boost )
set_target_properties ( Boost::boost PROPERTIES IMPORTED_GLOBAL TRUE )
set_target_properties ( Boost::boost PROPERTIES IMPORTED_GLOBAL TRUE )
add_library ( boost ALIAS Boost::boost )
add_library ( boost ALIAS Boost::boost )
endif ( )
endif ( )