@ -75,9 +75,7 @@ target_link_libraries(citra-qt ${PLATFORM_LIBRARIES})
# install ( TARGETS citra-qt RUNTIME DESTINATION ${ bindir } )
# install ( TARGETS citra-qt RUNTIME DESTINATION ${ bindir } )
# s e t u p a p o s t b u i l d t o c o p y t h e Q t D l l s t o t h e r i g h t p l a c e o n W i n d o w s MSVC
if ( Qt5_FOUND AND MSVC )
# I o n l y h a v e Q t 5 s o i f s o m e o n e w a n t s t o a d d t h i s f o r Q t 4 a s w e l l t h a t w o u l d b e g r e a t
if ( Qt5_FOUND )
set ( Qt5_DLL_DIR "${Qt5_DIR}/../../../bin" )
set ( Qt5_DLL_DIR "${Qt5_DIR}/../../../bin" )
file ( GLOB Qt5_DEBUG_DLLS
file ( GLOB Qt5_DEBUG_DLLS
" $ { Q t 5 _ D L L _ D I R } / i c u d t * . d l l "
" $ { Q t 5 _ D L L _ D I R } / i c u d t * . d l l "
@ -88,15 +86,6 @@ if (Qt5_FOUND)
" $ { Q t 5 _ D L L _ D I R } / Q t 5 O p e n G L d . * "
" $ { Q t 5 _ D L L _ D I R } / Q t 5 O p e n G L d . * "
" $ { Q t 5 _ D L L _ D I R } / Q t 5 W i d g e t s d . * "
" $ { Q t 5 _ D L L _ D I R } / Q t 5 W i d g e t s d . * "
)
)
foreach ( Dll ${ Qt5_DEBUG_DLLS } )
# t h e i f n o t e x i s t s k i p s t h i s c o p y i f t h e b u i l d d i r e c t o r y d o e s n ' t e x i s t s o i t d o e s n ' t e r r o r o u t
add_custom_command ( TARGET citra-qt POST_BUILD
C O M M A N D i f n o t e x i s t " $ { C M A K E _ B I N A R Y _ D I R } / b i n / D e b u g / " g o t o : c m E n d
C O M M A N D $ { C M A K E _ C O M M A N D } - E
c o p y $ { D l l } " $ { C M A K E _ B I N A R Y _ D I R } / b i n / D e b u g / " )
endforeach ( )
# s o o o h e r e ' s a f u n s t r u g g l e . I c a n ' t s e t a c u s t o m c o m m a n d f o r a s i n g l e b u i l d t a r g e t ,
# s o i n s t e a d I h a v e t o a d d a l l t h e s e t o e v e r y c o n f i g u r a t i o n i n V S a n y w a y .
file ( GLOB Qt5_RELEASE_DLLS
file ( GLOB Qt5_RELEASE_DLLS
" $ { Q t 5 _ D L L _ D I R } / i c u d t * . d l l "
" $ { Q t 5 _ D L L _ D I R } / i c u d t * . d l l "
" $ { Q t 5 _ D L L _ D I R } / i c u i n * . d l l "
" $ { Q t 5 _ D L L _ D I R } / i c u i n * . d l l "
@ -106,15 +95,16 @@ if (Qt5_FOUND)
" $ { Q t 5 _ D L L _ D I R } / Q t 5 O p e n G L . * "
" $ { Q t 5 _ D L L _ D I R } / Q t 5 O p e n G L . * "
" $ { Q t 5 _ D L L _ D I R } / Q t 5 W i d g e t s . * "
" $ { Q t 5 _ D L L _ D I R } / Q t 5 W i d g e t s . * "
)
)
foreach ( Dll ${ Qt5_RELEASE_DLLS } )
# m a k e t h e o u t p u t d i r e c t o r i e s a h e a d o f t h e t i m e a n d c o p y i n t h e n e e d e d D l l s n o w
add_custom_command ( TARGET citra-qt POST_BUILD
file ( MAKE_DIRECTORY
C O M M A N D i f n o t e x i s t " $ { C M A K E _ B I N A R Y _ D I R } / b i n / R e l e a s e / " g o t o : c m E n d
$ { C M A K E _ B I N A R Y _ D I R } / b i n / D e b u g /
C O M M A N D $ { C M A K E _ C O M M A N D } - E
$ { C M A K E _ B I N A R Y _ D I R } / b i n / R e l e a s e /
c o p y $ { D l l } " $ { C M A K E _ B I N A R Y _ D I R } / b i n / R e l e a s e / " )
$ { C M A K E _ B I N A R Y _ D I R } / b i n / R e l W i t h D e b I n f o /
add_custom_command ( TARGET citra-qt POST_BUILD
)
C O M M A N D i f n o t e x i s t " $ { C M A K E _ B I N A R Y _ D I R } / b i n / R e l W i t h D e b I n f o / " g o t o : c m E n d
file ( COPY ${ Qt5_DEBUG_DLLS } DESTINATION ${ CMAKE_BINARY_DIR } /bin/Debug/ )
C O M M A N D $ { C M A K E _ C O M M A N D } - E
file ( COPY ${ Qt5_RELEASE_DLLS } DESTINATION ${ CMAKE_BINARY_DIR } /bin/Release/ )
c o p y $ { D l l } " $ { C M A K E _ B I N A R Y _ D I R } / b i n / R e l W i t h D e b I n f o / " )
file ( COPY ${ Qt5_RELEASE_DLLS } DESTINATION ${ CMAKE_BINARY_DIR } /bin/RelWithDebInfo/ )
endforeach ( )
unset ( Qt5_RELEASE_DLLS )
unset ( Qt5_DEBUG_DLLS )
unset ( Qt5_DLL_DIR )
unset ( Qt5_DLL_DIR )
endif ( )
endif ( )