|
| 1 | +project("emulationstation") |
| 2 | + |
| 3 | +set(ES_HEADERS |
| 4 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/EmulationStation.h |
| 5 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.h |
| 6 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/FileSorts.h |
| 7 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/MetaData.h |
| 8 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/PlatformId.h |
| 9 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/ScraperCmdLine.h |
| 10 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.h |
| 11 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.h |
| 12 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/Gamelist.h |
| 13 | + |
| 14 | + # GuiComponents |
| 15 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/AsyncReqComponent.h |
| 16 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.h |
| 17 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScraperSearchComponent.h |
| 18 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextListComponent.h |
| 19 | + |
| 20 | + # Guis |
| 21 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiFastSelect.h |
| 22 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.h |
| 23 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.h |
| 24 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.h |
| 25 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.h |
| 26 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.h |
| 27 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.h |
| 28 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperStart.h |
| 29 | + |
| 30 | + # Scrapers |
| 31 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.h |
| 32 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBScraper.h |
| 33 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/TheArchiveScraper.h |
| 34 | + |
| 35 | + # Views |
| 36 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGameListView.h |
| 37 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGameListView.h |
| 38 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGameListView.h |
| 39 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGameListView.h |
| 40 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGameListView.h |
| 41 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/SystemView.h |
| 42 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/ViewController.h |
| 43 | + |
| 44 | + # Animations |
| 45 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/animations/LaunchAnimation.h |
| 46 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/animations/MoveCameraAnimation.h |
| 47 | +) |
| 48 | + |
| 49 | +set(ES_SOURCES |
| 50 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.cpp |
| 51 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/FileSorts.cpp |
| 52 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp |
| 53 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/MameNameMap.cpp |
| 54 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/MetaData.cpp |
| 55 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/PlatformId.cpp |
| 56 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/ScraperCmdLine.cpp |
| 57 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.cpp |
| 58 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.cpp |
| 59 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/Gamelist.cpp |
| 60 | + |
| 61 | + # GuiComponents |
| 62 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/AsyncReqComponent.cpp |
| 63 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.cpp |
| 64 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScraperSearchComponent.cpp |
| 65 | + |
| 66 | + # Guis |
| 67 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiFastSelect.cpp |
| 68 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.cpp |
| 69 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.cpp |
| 70 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.cpp |
| 71 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.cpp |
| 72 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.cpp |
| 73 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.cpp |
| 74 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperStart.cpp |
| 75 | + |
| 76 | + # Scrapers |
| 77 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.cpp |
| 78 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBScraper.cpp |
| 79 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/TheArchiveScraper.cpp |
| 80 | + |
| 81 | + # Views |
| 82 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGameListView.cpp |
| 83 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGameListView.cpp |
| 84 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGameListView.cpp |
| 85 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGameListView.cpp |
| 86 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGameListView.cpp |
| 87 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/SystemView.cpp |
| 88 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/ViewController.cpp |
| 89 | +) |
| 90 | + |
| 91 | +#------------------------------------------------------------------------------- |
| 92 | +# define OS specific sources and headers |
| 93 | +if(MSVC) |
| 94 | + LIST(APPEND ES_SOURCES |
| 95 | + ${CMAKE_CURRENT_SOURCE_DIR}/src/EmulationStation.rc |
| 96 | + ) |
| 97 | +endif() |
| 98 | + |
| 99 | +#------------------------------------------------------------------------------- |
| 100 | +# define target |
| 101 | +include_directories(${COMMON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/src) |
| 102 | +add_executable(emulationstation ${ES_SOURCES} ${ES_HEADERS}) |
| 103 | +target_link_libraries(emulationstation ${COMMON_LIBRARIES} es-core) |
| 104 | + |
| 105 | +# special properties for Windows builds |
| 106 | +if(MSVC) |
| 107 | + #show console in debug builds, but not in proper release builds |
| 108 | + #Note that up to CMake 2.8.10 this feature is broken: http://public.kitware.com/Bug/view.php?id=12566 |
| 109 | + set_target_properties(emulationstation PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE") |
| 110 | + set_target_properties(emulationstation PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE") |
| 111 | + set_target_properties(emulationstation PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE") |
| 112 | + set_target_properties(emulationstation PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE") |
| 113 | + set_target_properties(emulationstation PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS") |
| 114 | + set_target_properties(emulationstation PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS") |
| 115 | +endif() |
| 116 | + |
| 117 | + |
| 118 | +#------------------------------------------------------------------------------- |
| 119 | +# set up CPack install stuff so `make install` does something useful |
| 120 | + |
| 121 | +install(TARGETS emulationstation |
| 122 | + RUNTIME |
| 123 | + DESTINATION bin) |
| 124 | + |
| 125 | +INCLUDE(InstallRequiredSystemLibraries) |
| 126 | + |
| 127 | +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A flexible graphical emulator front-end") |
| 128 | +SET(CPACK_PACKAGE_DESCRIPTION "EmulationStation is a flexible, graphical front-end designed for keyboardless navigation of your multi-platform retro game collection.") |
| 129 | + |
| 130 | +SET(CPACK_RESOURCE_FILE LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md") |
| 131 | +SET(CPACK_RESOURCE_FILE README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") |
| 132 | + |
| 133 | +SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Alec Lofquist <allofquist@yahoo.com>") |
| 134 | +SET(CPACK_DEBIAN_PACKAGE_SECTION "misc") |
| 135 | +SET(CPACK_DEBIAN_PACKAGE_PRIORITY "extra") |
| 136 | +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libsdl2-2.0-0, libboost-system1.54.0, libboost-filesystem1.54.0, libfreeimage3, libfreetype6, libcurl3, libasound2") |
| 137 | +SET(CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS "debhelper (>= 8.0.0), cmake, g++ (>= 4.8), libsdl2-dev, libboost-system-dev, libboost-filesystem-dev, libboost-date-time-dev, libfreeimage-dev, libfreetype6-dev, libeigen3-dev, libcurl4-openssl-dev, libasound2-dev, libgl1-mesa-dev") |
| 138 | + |
| 139 | +SET(CPACK_PACKAGE_VENDOR "emulationstation.org") |
| 140 | +SET(CPACK_PACKAGE_VERSION "2.0.0~rc1") |
| 141 | +SET(CPACK_PACKAGE_VERSION_MAJOR "2") |
| 142 | +SET(CPACK_PACKAGE_VERSION_MINOR "0") |
| 143 | +SET(CPACK_PACKAGE_VERSION_PATCH "0") |
| 144 | +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "emulationstation_${CMAKE_PACKAGE_VERSION}") |
| 145 | +SET(CPACK_PACKAGE_EXECUTABLES "emulationstation" "emulationstation") |
| 146 | + |
| 147 | +SET(CPACK_GENERATOR "TGZ;DEB") |
| 148 | + |
| 149 | +INCLUDE(CPack) |
0 commit comments