2021-08-24 16:32:15 +00:00
# SPDX-License-Identifier: MIT
#
# EmulationStation Desktop Edition
# CMakeLists.txt (es-app)
#
# CMake configuration for es-app.
# Also contains the application packaging configuration.
#
2022-04-19 15:24:54 +00:00
project ( emulationstation-de )
2014-06-25 16:29:58 +00:00
set ( ES_HEADERS
2021-09-19 16:53:20 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / C o l l e c t i o n S y s t e m s M a n a g e r . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / E m u l a t i o n S t a t i o n . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / F i l e D a t a . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / F i l e F i l t e r I n d e x . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / F i l e S o r t s . h
2022-01-15 13:12:56 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / G a m e l i s t F i l e P a r s e r . h
2021-09-19 16:53:20 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / M e d i a V i e w e r . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / M e t a D a t a . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / M i x i m a g e G e n e r a t o r . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / P l a t f o r m I d . h
2022-01-17 17:43:29 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / S c r e e n s a v e r . h
2021-09-19 16:53:20 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / S y s t e m D a t a . h
2022-01-17 20:53:23 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / U I M o d e C o n t r o l l e r . h
2021-09-19 16:53:20 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / V o l u m e C o n t r o l . h
2020-08-19 20:30:10 +00:00
2021-09-19 16:53:20 +00:00
# GUIs
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i A l t e r n a t i v e E m u l a t o r s . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i C o l l e c t i o n S y s t e m s O p t i o n s . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i G a m e l i s t F i l t e r . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i G a m e l i s t O p t i o n s . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i L a u n c h S c r e e n . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i M e d i a V i e w e r O p t i o n s . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i M e n u . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i M e t a D a t a E d . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i O f f l i n e G e n e r a t o r . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i S c r a p e r M e n u . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i S c r a p e r M u l t i . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i S c r a p e r S e a r c h . h
2022-01-16 10:10:32 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i S c r a p e r S i n g l e . h
2021-09-19 16:53:20 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i S c r e e n s a v e r O p t i o n s . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i S e t t i n g s . h
2020-08-19 20:30:10 +00:00
2021-09-19 16:53:20 +00:00
# Scrapers
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / s c r a p e r s / G a m e s D B J S O N S c r a p e r . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / s c r a p e r s / G a m e s D B J S O N S c r a p e r R e s o u r c e s . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / s c r a p e r s / S c r a p e r . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / s c r a p e r s / S c r e e n S c r a p e r . h
2020-08-19 20:30:10 +00:00
2021-09-19 16:53:20 +00:00
# Views
2022-01-18 16:14:17 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / v i e w s / G a m e l i s t B a s e . h
2022-01-22 20:42:43 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / v i e w s / G a m e l i s t L e g a c y . h
2022-01-18 16:14:17 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / v i e w s / G a m e l i s t V i e w . h
2021-09-19 16:53:20 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / v i e w s / S y s t e m V i e w . h
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / v i e w s / V i e w C o n t r o l l e r . h
2014-06-25 16:29:58 +00:00
)
set ( ES_SOURCES
2021-09-19 16:53:20 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / C o l l e c t i o n S y s t e m s M a n a g e r . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / F i l e D a t a . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / F i l e F i l t e r I n d e x . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / F i l e S o r t s . c p p
2022-01-15 13:12:56 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / G a m e l i s t F i l e P a r s e r . c p p
2021-09-19 16:53:20 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / m a i n . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / M e d i a V i e w e r . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / M e t a D a t a . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / M i x i m a g e G e n e r a t o r . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / P l a t f o r m I d . c p p
2022-01-17 17:43:29 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / S c r e e n s a v e r . c p p
2021-09-19 16:53:20 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / S y s t e m D a t a . c p p
2022-01-17 20:53:23 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / U I M o d e C o n t r o l l e r . c p p
2021-09-19 16:53:20 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / V o l u m e C o n t r o l . c p p
2020-08-19 20:30:10 +00:00
2021-09-19 16:53:20 +00:00
# GUIs
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i A l t e r n a t i v e E m u l a t o r s . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i C o l l e c t i o n S y s t e m s O p t i o n s . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i G a m e l i s t F i l t e r . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i G a m e l i s t O p t i o n s . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i L a u n c h S c r e e n . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i M e n u . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i M e d i a V i e w e r O p t i o n s . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i M e t a D a t a E d . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i O f f l i n e G e n e r a t o r . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i S c r a p e r M e n u . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i S c r a p e r M u l t i . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i S c r a p e r S e a r c h . c p p
2022-01-16 10:10:32 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i S c r a p e r S i n g l e . c p p
2021-09-19 16:53:20 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i S c r e e n s a v e r O p t i o n s . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / g u i s / G u i S e t t i n g s . c p p
2020-08-19 20:30:10 +00:00
2021-09-19 16:53:20 +00:00
# Scrapers
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / s c r a p e r s / G a m e s D B J S O N S c r a p e r . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / s c r a p e r s / G a m e s D B J S O N S c r a p e r R e s o u r c e s . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / s c r a p e r s / S c r a p e r . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / s c r a p e r s / S c r e e n S c r a p e r . c p p
2020-08-19 20:30:10 +00:00
2021-09-19 16:53:20 +00:00
# Views
2022-01-18 16:14:17 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / v i e w s / G a m e l i s t B a s e . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / v i e w s / G a m e l i s t V i e w . c p p
2021-09-19 16:53:20 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / v i e w s / S y s t e m V i e w . c p p
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c / v i e w s / V i e w C o n t r o l l e r . c p p
2014-06-25 16:29:58 +00:00
)
2020-07-03 18:23:51 +00:00
if ( WIN32 )
2020-08-19 20:30:10 +00:00
LIST ( APPEND ES_SOURCES ${ CMAKE_CURRENT_SOURCE_DIR } /assets/EmulationStation.rc )
2014-06-25 16:29:58 +00:00
endif ( )
2021-01-21 20:44:51 +00:00
#---------------------------------------------------------------------------------------------------
# OS-specific installation and package generation setup.
2020-06-24 15:38:41 +00:00
# Define target.
2020-08-19 20:30:10 +00:00
if ( APPLE OR WIN32 )
include_directories ( ${ COMMON_INCLUDE_DIRS } ${ CMAKE_CURRENT_SOURCE_DIR } /src )
add_executable ( EmulationStation ${ ES_SOURCES } ${ ES_HEADERS } )
target_link_libraries ( EmulationStation ${ COMMON_LIBRARIES } es-core )
2020-12-20 12:13:12 +00:00
set_target_properties ( EmulationStation PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE )
2020-08-19 20:30:10 +00:00
else ( )
include_directories ( ${ COMMON_INCLUDE_DIRS } ${ CMAKE_CURRENT_SOURCE_DIR } /src )
add_executable ( emulationstation ${ ES_SOURCES } ${ ES_HEADERS } )
2022-01-06 22:19:37 +00:00
target_link_libraries ( emulationstation ${ COMMON_LIBRARIES } ${ CMAKE_DL_LIBS } es-core )
2020-11-26 19:03:37 +00:00
set_target_properties ( emulationstation PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE )
2020-08-19 20:30:10 +00:00
endif ( )
2014-06-25 16:29:58 +00:00
2020-08-19 20:30:10 +00:00
# Setup for installation and package generation.
2020-07-07 19:33:33 +00:00
if ( WIN32 )
2020-08-23 19:27:01 +00:00
install ( TARGETS EmulationStation RUNTIME DESTINATION . )
2022-04-19 15:24:54 +00:00
if ( CMAKE_CXX_COMPILER_ID MATCHES MSVC )
2022-04-15 09:13:15 +00:00
install ( FILES ../avcodec-59.dll
. . / a v f i l t e r - 8 . d l l
. . / a v f o r m a t - 5 9 . d l l
. . / a v u t i l - 5 7 . d l l
. . / p o s t p r o c - 5 6 . d l l
. . / s w r e s a m p l e - 4 . d l l
. . / s w s c a l e - 6 . d l l
2021-09-19 16:53:20 +00:00
. . / F r e e I m a g e . d l l
. . / f r e e t y p e . d l l
. . / g l e w 3 2 . d l l
. . / l i b c r y p t o - 1 _ 1 - x 6 4 . d l l
. . / l i b c u r l - x 6 4 . d l l
. . / l i b s s l - 1 _ 1 - x 6 4 . d l l
. . / M S V C P 1 4 0 . d l l
. . / p u g i x m l . d l l
2022-01-06 23:29:31 +00:00
. . / r l o t t i e . d l l
2021-09-19 16:53:20 +00:00
. . / S D L 2 . d l l
. . / V C O M P 1 4 0 . D L L
. . / V C R U N T I M E 1 4 0 . d l l
. . / V C R U N T I M E 1 4 0 _ 1 . d l l
D E S T I N A T I O N . )
2020-12-28 22:23:01 +00:00
else ( )
2022-04-15 09:13:15 +00:00
install ( FILES ../avcodec-59.dll
. . / a v f i l t e r - 8 . d l l
. . / a v f o r m a t - 5 9 . d l l
. . / a v u t i l - 5 7 . d l l
. . / p o s t p r o c - 5 6 . d l l
. . / s w r e s a m p l e - 4 . d l l
. . / s w s c a l e - 6 . d l l
2021-09-19 16:53:20 +00:00
. . / F r e e I m a g e . d l l
. . / g l e w 3 2 . d l l
. . / l i b c r y p t o - 1 _ 1 - x 6 4 . d l l
. . / l i b c u r l - x 6 4 . d l l
. . / l i b f r e e t y p e . d l l
. . / l i b p u g i x m l . d l l
2022-01-06 23:29:31 +00:00
. . / l i b r l o t t i e . d l l
2021-09-19 16:53:20 +00:00
. . / l i b s s l - 1 _ 1 - x 6 4 . d l l
. . / S D L 2 . d l l
. . / v c o m p 1 4 0 . d l l
D E S T I N A T I O N . )
2020-12-28 22:23:01 +00:00
endif ( )
2022-01-02 12:13:01 +00:00
2020-07-07 19:33:33 +00:00
install ( FILES ../LICENSE DESTINATION . )
2020-08-19 20:50:45 +00:00
install ( DIRECTORY ${ CMAKE_SOURCE_DIR } /licenses DESTINATION . )
2020-07-07 19:33:33 +00:00
install ( DIRECTORY ${ CMAKE_SOURCE_DIR } /themes DESTINATION . )
install ( DIRECTORY ${ CMAKE_SOURCE_DIR } /resources DESTINATION . )
2020-08-19 20:30:10 +00:00
elseif ( APPLE )
2020-08-21 19:58:12 +00:00
# For completely unknown reasons, when generating a Bundle using cpack, an extra 'Resources'
# directory is added to the target path. Simply adding the two dots as a prefix fixes the
# problem, but doing so would break 'make install' which was actually behaving correctly.
# So an extra 'Resources' directory was added to the CMAKE_INSTALL_PREFIX variable as well
# to compensate for this. It's a bad solution to the problem and there must surely be a
# better way to fix this.
2021-09-19 16:53:20 +00:00
install ( TARGETS EmulationStation RUNTIME DESTINATION ../MacOS )
install ( FILES ${ CMAKE_CURRENT_SOURCE_DIR } /assets/EmulationStation-DE.icns DESTINATION ../Resources )
install ( FILES ${ CMAKE_CURRENT_SOURCE_DIR } /assets/EmulationStation-DE_Info.plist DESTINATION .. RENAME Info.plist )
2020-08-23 09:35:02 +00:00
2021-09-19 16:53:20 +00:00
set ( APPLE_DYLIB_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE
G R O U P _ R E A D G R O U P _ E X E C U T E
W O R L D _ R E A D W O R L D _ E X E C U T E )
2020-11-27 16:50:28 +00:00
2022-04-15 09:30:41 +00:00
install ( FILES ${ CMAKE_SOURCE_DIR } /libavcodec.59.dylib
2021-09-19 16:53:20 +00:00
P E R M I S S I O N S $ { A P P L E _ D Y L I B _ P E R M I S S I O N S } D E S T I N A T I O N . . / M a c O S )
2022-04-15 09:30:41 +00:00
install ( FILES ${ CMAKE_SOURCE_DIR } /libavfilter.8.dylib
2021-09-19 16:53:20 +00:00
P E R M I S S I O N S $ { A P P L E _ D Y L I B _ P E R M I S S I O N S } D E S T I N A T I O N . . / M a c O S )
2022-04-15 09:30:41 +00:00
install ( FILES ${ CMAKE_SOURCE_DIR } /libavformat.59.dylib
2021-09-19 16:53:20 +00:00
P E R M I S S I O N S $ { A P P L E _ D Y L I B _ P E R M I S S I O N S } D E S T I N A T I O N . . / M a c O S )
2022-04-15 09:30:41 +00:00
install ( FILES ${ CMAKE_SOURCE_DIR } /libavutil.57.dylib
2021-09-19 16:53:20 +00:00
P E R M I S S I O N S $ { A P P L E _ D Y L I B _ P E R M I S S I O N S } D E S T I N A T I O N . . / M a c O S )
2022-04-15 09:30:41 +00:00
install ( FILES ${ CMAKE_SOURCE_DIR } /libpostproc.56.dylib
2021-09-19 16:53:20 +00:00
P E R M I S S I O N S $ { A P P L E _ D Y L I B _ P E R M I S S I O N S } D E S T I N A T I O N . . / M a c O S )
2022-04-15 09:30:41 +00:00
install ( FILES ${ CMAKE_SOURCE_DIR } /libswresample.4.dylib
2021-09-19 16:53:20 +00:00
P E R M I S S I O N S $ { A P P L E _ D Y L I B _ P E R M I S S I O N S } D E S T I N A T I O N . . / M a c O S )
2022-04-15 09:30:41 +00:00
install ( FILES ${ CMAKE_SOURCE_DIR } /libswscale.6.dylib
2021-09-19 16:53:20 +00:00
P E R M I S S I O N S $ { A P P L E _ D Y L I B _ P E R M I S S I O N S } D E S T I N A T I O N . . / M a c O S )
2021-11-30 21:14:18 +00:00
install ( FILES ${ CMAKE_SOURCE_DIR } /libvorbis.0.4.9.dylib
2021-09-19 16:53:20 +00:00
P E R M I S S I O N S $ { A P P L E _ D Y L I B _ P E R M I S S I O N S } D E S T I N A T I O N . . / M a c O S )
2021-11-30 21:14:18 +00:00
install ( FILES ${ CMAKE_SOURCE_DIR } /libvorbisenc.2.0.12.dylib
2021-09-19 16:53:20 +00:00
P E R M I S S I O N S $ { A P P L E _ D Y L I B _ P E R M I S S I O N S } D E S T I N A T I O N . . / M a c O S )
2021-11-30 21:14:18 +00:00
install ( FILES ${ CMAKE_SOURCE_DIR } /libfreetype.6.dylib
2021-09-19 16:53:20 +00:00
P E R M I S S I O N S $ { A P P L E _ D Y L I B _ P E R M I S S I O N S } D E S T I N A T I O N . . / M a c O S )
2021-11-30 21:14:18 +00:00
install ( FILES ${ CMAKE_SOURCE_DIR } /libSDL2-2.0.dylib
2021-09-19 16:53:20 +00:00
P E R M I S S I O N S $ { A P P L E _ D Y L I B _ P E R M I S S I O N S } D E S T I N A T I O N . . / M a c O S )
install ( FILES ${ CMAKE_SOURCE_DIR } /LICENSE DESTINATION ../Resources )
install ( DIRECTORY ${ CMAKE_SOURCE_DIR } /resources DESTINATION ../Resources )
install ( DIRECTORY ${ CMAKE_SOURCE_DIR } /themes DESTINATION ../Resources )
install ( DIRECTORY ${ CMAKE_SOURCE_DIR } /licenses DESTINATION ../Resources )
2020-07-07 19:33:33 +00:00
else ( )
2021-09-19 16:53:20 +00:00
install ( TARGETS emulationstation RUNTIME DESTINATION ${ CMAKE_INSTALL_PREFIX } /bin )
2022-04-19 15:24:54 +00:00
if ( CMAKE_SYSTEM_NAME MATCHES Linux )
2021-04-02 10:38:31 +00:00
install ( FILES ${ CMAKE_CURRENT_SOURCE_DIR } /assets/emulationstation.6.gz
2021-09-19 16:53:20 +00:00
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } / s h a r e / m a n / m a n 6 )
2021-04-02 10:38:31 +00:00
else ( )
install ( FILES ${ CMAKE_CURRENT_SOURCE_DIR } /assets/emulationstation.6.gz
2021-09-19 16:53:20 +00:00
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } / m a n / m a n 6 )
2021-04-02 10:38:31 +00:00
endif ( )
2020-07-12 14:23:49 +00:00
install ( FILES ${ CMAKE_SOURCE_DIR } /LICENSE
2021-09-19 16:53:20 +00:00
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } / s h a r e / e m u l a t i o n s t a t i o n )
2021-11-21 18:38:38 +00:00
install ( FILES ${ CMAKE_CURRENT_SOURCE_DIR } /assets/org.es_de.emulationstation-de.desktop
2021-09-19 16:53:20 +00:00
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } / s h a r e / a p p l i c a t i o n s )
2022-04-24 10:28:53 +00:00
install ( FILES ${ CMAKE_CURRENT_SOURCE_DIR } /assets/org.es_de.emulationstation-de.svg
2021-09-19 16:53:20 +00:00
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } / s h a r e / p i x m a p s )
2022-04-24 11:05:55 +00:00
install ( FILES ${ CMAKE_CURRENT_SOURCE_DIR } /assets/org.es_de.emulationstation-de.svg
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } / s h a r e / i c o n s / h i c o l o r / s c a l a b l e / a p p s )
2021-11-21 18:38:38 +00:00
install ( FILES ${ CMAKE_CURRENT_SOURCE_DIR } /assets/org.es_de.emulationstation-de.appdata.xml
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } / s h a r e / m e t a i n f o )
2020-08-19 20:50:45 +00:00
install ( DIRECTORY ${ CMAKE_SOURCE_DIR } /licenses
2021-09-19 16:53:20 +00:00
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } / s h a r e / e m u l a t i o n s t a t i o n )
2020-07-07 19:33:33 +00:00
install ( DIRECTORY ${ CMAKE_SOURCE_DIR } /themes
2021-09-19 16:53:20 +00:00
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } / s h a r e / e m u l a t i o n s t a t i o n )
2020-07-07 19:33:33 +00:00
install ( DIRECTORY ${ CMAKE_SOURCE_DIR } /resources
2021-09-19 16:53:20 +00:00
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } / s h a r e / e m u l a t i o n s t a t i o n )
2020-07-07 19:33:33 +00:00
endif ( )
include ( InstallRequiredSystemLibraries )
#---------------------------------------------------------------------------------------------------
2020-08-19 20:30:10 +00:00
# General CPack settings.
2021-01-21 20:44:51 +00:00
2022-04-19 15:24:54 +00:00
set ( CPACK_PACKAGE_NAME emulationstation-de )
2021-08-12 10:03:11 +00:00
set ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "Emulator frontend" )
2022-04-19 15:24:54 +00:00
set ( CPACK_PACKAGE_DESCRIPTION "EmulationStation Desktop Edition (ES-DE) is a frontend for browsing and launching games from your multi-platform game collection." )
set ( CPACK_PACKAGE_VERSION ${ ES_VERSION } )
2021-05-04 15:03:18 +00:00
2020-09-17 19:49:40 +00:00
if ( APPLE )
2020-11-30 17:58:55 +00:00
# Shorter line length license file to be able to fit inside the drag-and-drop installer window without introducing extra line breaks.
2022-04-19 15:24:54 +00:00
set ( CPACK_RESOURCE_FILE_LICENSE ${ CMAKE_CURRENT_SOURCE_DIR } /assets/EmulationStation-DE_LICENSE_macOS )
2020-11-30 17:58:55 +00:00
elseif ( WIN32 )
# The installer window looks a bit different on Windows so a specific file for this OS is required.
2022-04-19 15:24:54 +00:00
set ( CPACK_RESOURCE_FILE_LICENSE ${ CMAKE_CURRENT_SOURCE_DIR } /assets/EmulationStation-DE_LICENSE_Windows )
2020-09-17 19:49:40 +00:00
else ( )
2022-04-19 15:24:54 +00:00
set ( CPACK_RESOURCE_FILE_LICENSE ${ CMAKE_SOURCE_DIR } /LICENSE )
2020-09-17 19:49:40 +00:00
endif ( )
2020-07-07 19:33:33 +00:00
set ( CPACK_PACKAGE_VENDOR "Leon Styhre" )
2022-04-19 15:24:54 +00:00
# Use the shorter x64 descriptor for the x86_64/AMD64 architecture.
if ( CMAKE_HOST_SYSTEM_PROCESSOR MATCHES x86_64 OR CMAKE_HOST_SYSTEM_PROCESSOR MATCHES AMD64 )
set ( CPU_ARCHITECTURE x64 )
2021-03-27 10:13:43 +00:00
else ( )
2022-04-19 15:24:54 +00:00
set ( CPU_ARCHITECTURE ${ CMAKE_HOST_SYSTEM_PROCESSOR } )
2021-03-27 10:13:43 +00:00
endif ( )
2020-08-19 20:30:10 +00:00
# Settings per operating system and generator type.
if ( APPLE )
2022-04-19 15:24:54 +00:00
set ( CPACK_GENERATOR Bundle )
2021-09-19 16:53:20 +00:00
if ( CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.14 )
2022-04-19 15:24:54 +00:00
set ( CPACK_PACKAGE_FILE_NAME EmulationStation-DE- ${ CPACK_PACKAGE_VERSION } - ${ CPU_ARCHITECTURE } _legacy )
2021-04-07 16:32:22 +00:00
set ( CPACK_DMG_VOLUME_NAME "EmulationStation Desktop Edition ${CPACK_PACKAGE_VERSION}_legacy" )
else ( )
2022-04-19 15:24:54 +00:00
set ( CPACK_PACKAGE_FILE_NAME EmulationStation-DE- ${ CPACK_PACKAGE_VERSION } - ${ CPU_ARCHITECTURE } )
2021-04-07 16:32:22 +00:00
set ( CPACK_DMG_VOLUME_NAME "EmulationStation Desktop Edition ${CPACK_PACKAGE_VERSION}" )
endif ( )
2022-04-19 15:24:54 +00:00
set ( CPACK_PACKAGE_ICON ${ CMAKE_CURRENT_SOURCE_DIR } /assets/EmulationStation-DE.icns )
set ( CPACK_DMG_DS_STORE ${ CMAKE_CURRENT_SOURCE_DIR } /assets/EmulationStation-DE_DS_Store )
2020-08-23 09:35:02 +00:00
set ( CPACK_BUNDLE_NAME "EmulationStation Desktop Edition" )
2022-04-19 15:24:54 +00:00
set ( CPACK_BUNDLE_ICON ${ CMAKE_CURRENT_SOURCE_DIR } /assets/EmulationStation-DE.icns )
set ( CPACK_BUNDLE_PLIST ${ CMAKE_CURRENT_SOURCE_DIR } /assets/EmulationStation-DE_Info.plist )
2021-05-13 17:33:07 +00:00
if ( MACOS_CODESIGN_IDENTITY )
set ( CPACK_BUNDLE_APPLE_CERT_APP "Developer ID Application: ${MACOS_CODESIGN_IDENTITY}" )
2021-09-19 16:53:20 +00:00
if ( CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.13 )
2021-05-13 17:33:07 +00:00
set ( CPACK_BUNDLE_APPLE_CODESIGN_PARAMETER "--deep --force --options runtime" )
endif ( )
endif ( )
2020-08-19 20:30:10 +00:00
elseif ( WIN32 )
2022-04-19 15:24:54 +00:00
set ( CPACK_GENERATOR NSIS )
set ( CPACK_PACKAGE_FILE_NAME EmulationStation-DE- ${ CPACK_PACKAGE_VERSION } - ${ CPU_ARCHITECTURE } )
set ( CPACK_PACKAGE_INSTALL_DIRECTORY EmulationStation-DE )
set ( CPACK_PACKAGE_EXECUTABLES EmulationStation EmulationStation )
set ( CPACK_NSIS_INSTALL_ROOT ${ PROGRAMFILES64 } )
set ( CPACK_NSIS_EXECUTABLES_DIRECTORY . )
set ( CPACK_NSIS_MUI_ICON ${ CMAKE_CURRENT_SOURCE_DIR } /assets/EmulationStation.ico )
2020-08-19 20:30:10 +00:00
set ( CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON )
2020-12-30 14:13:44 +00:00
set ( CPACK_NSIS_DISPLAY_NAME "EmulationStation Desktop Edition ${CPACK_PACKAGE_VERSION}" )
set ( CPACK_NSIS_PACKAGE_NAME "EmulationStation Desktop Edition" )
2022-04-19 15:24:54 +00:00
set ( CPACK_NSIS_INSTALLED_ICON_NAME EmulationStation.exe )
2020-08-19 20:30:10 +00:00
set ( CPACK_NSIS_WELCOME_TITLE "EmulationStation Desktop Edition Installer" )
set ( CPACK_NSIS_FINISH_TITLE "EmulationStation Desktop Edition Installation Completed" )
set ( CPACK_NSIS_MANIFEST_DPI_AWARE ON )
2021-04-03 14:44:57 +00:00
set ( CPACK_NSIS_MENU_LINKS "https://es-de.org" "ES-DE Website" "https://es-de.org/#Donations" "Please Donate" )
2020-07-07 19:33:33 +00:00
else ( )
2022-04-19 15:24:54 +00:00
set ( CPACK_PACKAGE_INSTALL_DIRECTORY emulationstation_ ${ CMAKE_PACKAGE_VERSION } )
set ( CPACK_PACKAGE_EXECUTABLES emulationstation emulationstation )
if ( LINUX_CPACK_GENERATOR MATCHES DEB )
set ( CPACK_GENERATOR DEB )
2021-05-04 15:09:19 +00:00
endif ( )
2022-04-19 15:24:54 +00:00
set ( CPACK_DEBIAN_FILE_NAME emulationstation-de- ${ CPACK_PACKAGE_VERSION } - ${ CPU_ARCHITECTURE } .deb )
2021-12-13 16:15:24 +00:00
set ( CPACK_DEBIAN_PACKAGE_MAINTAINER "Leon Styhre <info@es-de.org>" )
2022-04-19 15:24:54 +00:00
set ( CPACK_DEBIAN_PACKAGE_HOMEPAGE https://es-de.org )
set ( CPACK_DEBIAN_PACKAGE_SECTION games )
set ( CPACK_DEBIAN_PACKAGE_PRIORITY optional )
2020-08-19 20:30:10 +00:00
set ( CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON )
2022-04-19 15:24:54 +00:00
if ( LINUX_CPACK_GENERATOR MATCHES RPM )
set ( CPACK_GENERATOR RPM )
2021-05-04 15:09:19 +00:00
endif ( )
2022-04-19 15:24:54 +00:00
set ( CPACK_RPM_FILE_NAME emulationstation-de- ${ CPACK_PACKAGE_VERSION } - ${ CPU_ARCHITECTURE } .rpm )
2020-08-19 20:30:10 +00:00
set ( CPACK_RPM_PACKAGE_DESCRIPTION ${ CPACK_PACKAGE_DESCRIPTION } )
2022-04-19 15:24:54 +00:00
set ( CPACK_RPM_PACKAGE_LICENSE MIT )
list ( APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${ CMAKE_INSTALL_PREFIX } )
list ( APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${ CMAKE_INSTALL_PREFIX } /bin )
list ( APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${ CMAKE_INSTALL_PREFIX } /share )
2022-05-04 15:48:35 +00:00
list ( APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${ CMAKE_INSTALL_PREFIX } /share/icons )
list ( APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${ CMAKE_INSTALL_PREFIX } /share/icons/hicolor )
list ( APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${ CMAKE_INSTALL_PREFIX } /share/icons/hicolor/scalable )
list ( APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${ CMAKE_INSTALL_PREFIX } /share/icons/hicolor/scalable/apps )
2022-04-19 15:24:54 +00:00
list ( APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${ CMAKE_INSTALL_PREFIX } /share/man )
list ( APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${ CMAKE_INSTALL_PREFIX } /share/man/man6 )
list ( APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${ CMAKE_INSTALL_PREFIX } /share/metainfo )
list ( APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${ CMAKE_INSTALL_PREFIX } /share/pixmaps )
list ( APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${ CMAKE_INSTALL_PREFIX } /share/applications )
2020-07-07 19:33:33 +00:00
endif ( )
include ( CPack )