CMakeLists.txt (view raw)
1cmake_minimum_required(VERSION 2.6)
2project(mGBA C)
3set(BINARY_NAME mgba CACHE INTERNAL "Name of output binaries")
4set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99")
5set(USE_CLI_DEBUGGER ON CACHE BOOL "Whether or not to enable the CLI-mode ARM debugger")
6set(USE_GDB_STUB ON CACHE BOOL "Whether or not to enable the GDB stub ARM debugger")
7set(USE_FFMPEG ON CACHE BOOL "Whether or not to enable FFmpeg support")
8set(USE_PNG ON CACHE BOOL "Whether or not to enable PNG support")
9set(USE_LIBZIP ON CACHE BOOL "Whether or not to enable ZIP support")
10set(USE_MAGICK ON CACHE BOOL "Whether or not to enable ImageMagick support")
11set(USE_BLIP ON CACHE BOOL "Whether or not to enable blip_buf support")
12set(USE_LZMA ON CACHE BOOL "Whether or not to enable 7-Zip support")
13set(BUILD_QT ON CACHE BOOL "Build Qt frontend")
14set(BUILD_SDL ON CACHE BOOL "Build SDL frontend")
15set(BUILD_LIBRETRO OFF CACHE BOOL "Build libretro core")
16set(BUILD_PERF OFF CACHE BOOL "Build performance profiling tool")
17set(BUILD_STATIC OFF CACHE BOOL "Build a static library")
18set(BUILD_SHARED ON CACHE BOOL "Build a shared library")
19file(GLOB ARM_SRC ${CMAKE_SOURCE_DIR}/src/arm/*.c)
20file(GLOB GBA_SRC ${CMAKE_SOURCE_DIR}/src/gba/*.c)
21file(GLOB GBA_RR_SRC ${CMAKE_SOURCE_DIR}/src/gba/rr/*.c)
22file(GLOB GBA_SV_SRC ${CMAKE_SOURCE_DIR}/src/gba/supervisor/*.c)
23file(GLOB UTIL_SRC ${CMAKE_SOURCE_DIR}/src/util/*.[cSs])
24file(GLOB VFS_SRC ${CMAKE_SOURCE_DIR}/src/util/vfs/*.c)
25file(GLOB RENDERER_SRC ${CMAKE_SOURCE_DIR}/src/gba/renderers/video-software.c)
26file(GLOB SIO_SRC ${CMAKE_SOURCE_DIR}/src/gba/sio/lockstep.c)
27file(GLOB THIRD_PARTY_SRC ${CMAKE_SOURCE_DIR}/src/third-party/inih/*.c)
28list(APPEND UTIL_SRC ${CMAKE_SOURCE_DIR}/src/platform/commandline.c)
29source_group("ARM core" FILES ${ARM_SRC})
30source_group("GBA board" FILES ${GBA_SRC} ${RENDERER_SRC} ${SIO_SRC})
31source_group("GBA supervisor" FILES ${GBA_SV_SRC} ${GBA_RR_SRC})
32source_group("Utilities" FILES ${UTIL_SRC} ${VFS_SRC}})
33include_directories(${CMAKE_SOURCE_DIR}/src/arm)
34include_directories(${CMAKE_SOURCE_DIR}/src)
35
36if(NOT CMAKE_BUILD_TYPE)
37 set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type (e.g. Release or Debug)" FORCE)
38endif()
39
40set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
41
42include(GNUInstallDirs)
43
44# Function definitions
45include(FindPkgConfig)
46function(find_feature FEATURE_NAME FEATURE_REQUIRES)
47 if (NOT ${FEATURE_NAME})
48 return()
49 endif()
50 foreach(REQUIRE ${FEATURE_REQUIRES})
51 if(NOT ${REQUIRE}_FOUND)
52 find_package(${REQUIRE} QUIET)
53 if(NOT ${REQUIRE}_FOUND)
54 pkg_search_module(${REQUIRE} ${REQUIRE})
55 if (NOT ${REQUIRE}_FOUND)
56 message(WARNING "Requested module ${REQUIRE} missing for feature ${FEATURE_NAME}. Feature disabled.")
57 set(${FEATURE_NAME} OFF PARENT_SCOPE)
58 return()
59 endif()
60 endif()
61 endif()
62 string(TOUPPER ${REQUIRE} UREQUIRE)
63 set(${UREQUIRE}_CFLAGS_OTHER ${${REQUIRE}_CFLAGS_OTHER} PARENT_SCOPE)
64 set(${UREQUIRE}_FOUND ${${REQUIRE}_FOUND} PARENT_SCOPE)
65 set(${UREQUIRE}_INCLUDE_DIRS ${${REQUIRE}_INCLUDE_DIRS} PARENT_SCOPE)
66 set(${UREQUIRE}_LIBRARIES ${${REQUIRE}_LIBRARIES} PARENT_SCOPE)
67 set(${UREQUIRE}_LIBRARY_DIRS ${${REQUIRE}_LIBRARY_DIRS} PARENT_SCOPE)
68 set(${UREQUIRE}_LDFLAGS_OTHER ${${REQUIRE}_LDFLAGS_OTHER} PARENT_SCOPE)
69 endforeach()
70endfunction()
71
72# Version information
73set(LIB_VERSION_MAJOR 0)
74set(LIB_VERSION_MINOR 2)
75set(LIB_VERSION_PATCH 0)
76set(LIB_VERSION_ABI 0.2)
77set(LIB_VERSION_STRING ${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH})
78
79# Advanced settings
80set(BUILD_LTO ON CACHE BOOL "Build with link-time optimization")
81set(BUILD_PGO OFF CACHE BOOL "Build with profiling-guided optimization")
82set(PGO_STAGE_2 CACHE BOOL "Rebuild for profiling-guided optimization after profiles have been generated")
83set(PGO_DIR "/tmp/gba-pgo/" CACHE PATH "Profiling-guided optimization profiles path")
84mark_as_advanced(BUILD_LTO BUILD_PGO PGO_STAGE_2 PGO_DIR)
85set(PGO_PRE_FLAGS "-pg -fprofile-generate=${PGO_DIR} -fprofile-arcs")
86set(PGO_POST_FLAGS "-fprofile-use=${PGO_DIR} -fbranch-probabilities")
87
88if(BUILD_PGO AND NOT PGO_STAGE_2)
89 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${PGO_PRE_FLAGS}")
90 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PGO_PRE_FLAGS}")
91 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PGO_PRE_FLAGS}")
92elseif(BUILD_PGO AND PGO_STAGE_2)
93 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${PGO_POST_FLAGS}")
94 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PGO_POST_FLAGS}")
95 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PGO_POST_FLAGS}")
96endif()
97
98add_definitions(-DBINARY_NAME="${BINARY_NAME}" -DPROJECT_NAME="${PROJECT_NAME}" -DPROJECT_VERSION="${LIB_VERSION_STRING}")
99
100# Feature dependencies
101set(FEATURES)
102if(CMAKE_SYSTEM_NAME MATCHES .*BSD)
103 set(LIBEDIT_LIBRARIES -ledit)
104 if (CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
105 list(APPEND LIBEDIT_LIBRARIES -ltermcap)
106 endif()
107else()
108 find_feature(USE_CLI_DEBUGGER "libedit")
109endif()
110find_feature(USE_FFMPEG "libavcodec;libavformat;libavresample;libavutil;libswscale")
111find_feature(USE_PNG "ZLIB;PNG")
112find_feature(USE_LIBZIP "libzip")
113find_feature(USE_MAGICK "MagickWand")
114
115# Platform support
116if(WIN32)
117 set(WIN32_VERSION "${LIB_VERSION_MAJOR},${LIB_VERSION_MINOR},${LIB_VERSION_PATCH}")
118 add_definitions(-D_WIN32_WINNT=0x0600)
119 list(APPEND OS_LIB ws2_32)
120 file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/windows/*.c)
121 source_group("Windows-specific code" FILES ${OS_SRC})
122else()
123 add_definitions(-DUSE_PTHREADS -D_BSD_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=200809L)
124
125 if(NOT APPLE)
126 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
127 endif()
128 file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/posix/*.c)
129 source_group("POSIX-specific code" FILES ${OS_SRC})
130endif()
131
132if(APPLE)
133 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.6")
134endif()
135
136if(APPLE OR CMAKE_C_COMPILER_ID STREQUAL "GNU" AND BUILD_LTO)
137 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto")
138 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto")
139endif()
140
141if(BUILD_BBB OR BUILD_RASPI OR BUILD_PANDORA)
142 if(NOT BUILD_EGL)
143 add_definitions(-DCOLOR_16_BIT -DCOLOR_5_6_5)
144 endif()
145endif()
146
147if(BUILD_PANDORA)
148 add_definitions(-DBUILD_PANDORA)
149endif()
150
151if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*")
152 enable_language(ASM)
153endif()
154
155include(CheckFunctionExists)
156check_function_exists(strndup HAVE_STRNDUP)
157check_function_exists(snprintf_l HAVE_SNPRINTF_L)
158if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
159 # The strtof_l on Linux not actually exposed nor actually strtof_l
160 set(HAVE_STRTOF_L OFF)
161else()
162 check_function_exists(strtof_l HAVE_STRTOF_L)
163endif()
164check_function_exists(newlocale HAVE_NEWLOCALE)
165check_function_exists(freelocale HAVE_FREELOCALE)
166check_function_exists(uselocale HAVE_USELOCALE)
167
168if(HAVE_STRNDUP)
169 add_definitions(-DHAVE_STRNDUP)
170endif()
171
172if(HAVE_NEWLOCALE AND HAVE_FREELOCALE AND HAVE_USELOCALE)
173 add_definitions(-DHAVE_LOCALE)
174 if (HAVE_STRTOF_L)
175 add_definitions(-DHAVE_STRTOF_L)
176 endif()
177 if (HAVE_SNPRINTF_L)
178 add_definitions(-DHAVE_SNPRINTF_L)
179 endif()
180endif()
181
182
183# Features
184set(DEBUGGER_SRC ${CMAKE_SOURCE_DIR}/src/debugger/debugger.c ${CMAKE_SOURCE_DIR}/src/debugger/memory-debugger.c)
185set(FEATURE_SRC)
186set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6")
187
188if(USE_CLI_DEBUGGER)
189 list(APPEND FEATURES CLI_DEBUGGER)
190 list(APPEND FEATURE_SRC ${CMAKE_SOURCE_DIR}/src/debugger/cli-debugger.c)
191 list(APPEND FEATURE_SRC ${CMAKE_SOURCE_DIR}/src/debugger/parser.c)
192 list(APPEND FEATURE_SRC ${CMAKE_SOURCE_DIR}/src/gba/supervisor/cli.c)
193 include_directories(AFTER ${LIBEDIT_INCLUDE_DIRS})
194 link_directories(${LIBEDIT_LIBRARY_DIRS})
195 set(DEBUGGER_LIB ${LIBEDIT_LIBRARIES})
196 set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libedit2")
197else()
198 set(DEBUGGER_LIB "")
199endif()
200
201if(USE_GDB_STUB)
202 list(APPEND FEATURES GDB_STUB)
203 list(APPEND DEBUGGER_SRC ${CMAKE_SOURCE_DIR}/src/debugger/gdb-stub.c)
204endif()
205source_group("ARM debugger" FILES ${DEBUGGER_SRC})
206
207if(USE_FFMPEG)
208 list(APPEND FEATURES FFMPEG)
209 pkg_search_module(LIBSWRESAMPLE QUIET libswresample)
210 if(NOT LIBSWRESAMPLE_FOUND)
211 list(APPEND FEATURES LIBAV)
212 endif()
213 include_directories(AFTER ${LIBAVCODEC_INCLUDE_DIRS} ${LIBAVFORMAT_INCLUDE_DIRS} ${LIBAVRESAMPLE_INCLUDE_DIRS} ${LIBAVUTIL_INCLUDE_DIRS} ${LIBSWSCALE_INCLUDE_DIRS})
214 link_directories(${LIBAVCODEC_LIBRARY_DIRS} ${LIBAVFORMAT_LIBRARY_DIRS} ${LIBAVRESAMPLE_LIBRARY_DIRS} ${LIBAVUTIL_LIBRARY_DIRS} ${LIBSWSCALE_LIBRARY_DIRS})
215 list(APPEND FEATURE_SRC "${CMAKE_SOURCE_DIR}/src/platform/ffmpeg/ffmpeg-encoder.c")
216 string(REGEX MATCH "^[0-9]+" LIBAVCODEC_VERSION_MAJOR ${libavcodec_VERSION})
217 string(REGEX MATCH "^[0-9]+" LIBAVFORMAT_VERSION_MAJOR ${libavformat_VERSION})
218 string(REGEX MATCH "^[0-9]+" LIBAVRESAMPLE_VERSION_MAJOR ${libavresample_VERSION})
219 string(REGEX MATCH "^[0-9]+" LIBAVUTIL_VERSION_MAJOR ${libavutil_VERSION})
220 string(REGEX MATCH "^[0-9]+" LIBSWSCALE_VERSION_MAJOR ${libswscale_VERSION})
221 list(APPEND DEPENDENCY_LIB ${LIBAVCODEC_LIBRARIES} ${LIBAVFORMAT_LIBRARIES} ${LIBAVRESAMPLE_LIBRARIES} ${LIBAVUTIL_LIBRARIES} ${LIBSWSCALE_LIBRARIES})
222 set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libavcodec${LIBAVCODEC_VERSION_MAJOR},libavformat${LIBAVFORMAT_VERSION_MAJOR},libavresample${LIBAVRESAMPLE_VERSION_MAJOR},libavutil${LIBAVUTIL_VERSION_MAJOR},libswscale${LIBSWSCALE_VERSION_MAJOR}")
223 set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "libavcodec-extra")
224endif()
225
226if(USE_BLIP)
227 list(APPEND THIRD_PARTY_SRC "${CMAKE_SOURCE_DIR}/src/third-party/blip_buf/blip_buf.c")
228 add_definitions(-DRESAMPLE_LIBRARY=RESAMPLE_BLIP_BUF)
229else()
230 add_definitions(-DRESAMPLE_LIBRARY=RESAMPLE_NN)
231endif()
232
233if(USE_MAGICK)
234 list(APPEND FEATURES MAGICK)
235 include_directories(AFTER ${MAGICKWAND_INCLUDE_DIRS})
236 link_directories(${MAGICKWAND_LIBRARY_DIRS})
237 list(APPEND FEATURE_SRC "${CMAKE_SOURCE_DIR}/src/platform/imagemagick/imagemagick-gif-encoder.c")
238 list(APPEND DEPENDENCY_LIB ${MAGICKWAND_LIBRARIES})
239 string(REGEX MATCH "^[0-9]+\\.[0-9]+" MAGICKWAND_VERSION_PARTIAL ${MagickWand_VERSION})
240 if(${MAGICKWAND_VERSION_PARTIAL} EQUAL "6.7")
241 set(MAGICKWAND_DEB_VERSION "5")
242 else()
243 set(MAGICKWAND_DEB_VERSION "-6.q16-2")
244 endif()
245 set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libmagickwand${MAGICKWAND_DEB_VERSION}")
246endif()
247
248if(USE_PNG)
249 list(APPEND FEATURES PNG)
250 include_directories(AFTER ${PNG_INCLUDE_DIRS})
251 list(APPEND DEPENDENCY_LIB ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
252 set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libpng12-0,zlib1g")
253endif()
254
255if(USE_LIBZIP)
256 include_directories(AFTER ${LIBZIP_INCLUDE_DIRS})
257 link_directories(${LIBZIP_LIBRARY_DIRS})
258 list(APPEND DEPENDENCY_LIB ${LIBZIP_LIBRARIES})
259 list(APPEND FEATURES LIBZIP)
260 set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libzip2")
261endif()
262
263if (USE_LZMA)
264 include_directories(AFTER ${CMAKE_SOURCE_DIR}/third-party/lzma)
265 add_definitions(-D_7ZIP_PPMD_SUPPPORT)
266 set(LZMA_SRC
267 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/7zAlloc.c
268 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/7zArcIn.c
269 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/7zBuf.c
270 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/7zBuf2.c
271 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/7zCrc.c
272 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/7zCrcOpt.c
273 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/7zDec.c
274 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/CpuArch.c
275 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/LzmaDec.c
276 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/Lzma2Dec.c
277 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/Bra.c
278 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/Bra86.c
279 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/Bcj2.c
280 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/Ppmd7.c
281 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/Ppmd7Dec.c
282 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/7zFile.c
283 ${CMAKE_SOURCE_DIR}/src/third-party/lzma/7zStream.c)
284 list(APPEND FEATURE_SRC ${LZMA_SRC})
285 list(APPEND FEATURES LZMA)
286endif()
287
288set(FEATURE_DEFINES)
289foreach(FEATURE IN LISTS FEATURES)
290 list(APPEND FEATURE_DEFINES "USE_${FEATURE}")
291endforeach()
292
293# Binaries
294set(CORE_SRC
295 ${ARM_SRC}
296 ${GBA_SRC}
297 ${GBA_RR_SRC}
298 ${GBA_SV_SRC}
299 ${DEBUGGER_SRC}
300 ${RENDERER_SRC}
301 ${SIO_SRC}
302 ${UTIL_SRC}
303 ${VFS_SRC}
304 ${OS_SRC}
305 ${THIRD_PARTY_SRC})
306
307set(SRC
308 ${CORE_SRC}
309 ${FEATURE_SRC})
310
311if(NOT BUILD_STATIC AND NOT BUILD_SHARED)
312 set(BUILD_SHARED ON)
313endif()
314
315if(BUILD_SHARED)
316 add_library(${BINARY_NAME} SHARED ${SRC})
317 if(BUILD_STATIC)
318 add_library(${BINARY_NAME}-static STATIC ${SRC})
319 set_target_properties(${BINARY_NAME}-static PROPERTIES COMPILE_DEFINITIONS "${FEATURE_DEFINES}")
320 install(TARGETS ${BINARY_NAME}-static DESTINATION lib COMPONENT lib${BINARY_NAME})
321 endif()
322else()
323 add_library(${BINARY_NAME} STATIC ${SRC})
324endif()
325
326target_link_libraries(${BINARY_NAME} m ${DEBUGGER_LIB} ${OS_LIB} ${DEPENDENCY_LIB})
327install(TARGETS ${BINARY_NAME} DESTINATION lib COMPONENT lib${BINARY_NAME})
328set_target_properties(${BINARY_NAME} PROPERTIES VERSION ${LIB_VERSION_STRING} SOVERSION ${LIB_VERSION_ABI} COMPILE_DEFINITIONS "${FEATURE_DEFINES}")
329
330if(BUILD_LIBRETRO)
331 file(GLOB RETRO_SRC ${CMAKE_SOURCE_DIR}/src/platform/libretro/*.c)
332 add_library(${BINARY_NAME}_libretro SHARED ${CORE_SRC} ${RETRO_SRC})
333 set_target_properties(${BINARY_NAME}_libretro PROPERTIES PREFIX "" COMPILE_DEFINITIONS "COLOR_16_BIT;COLOR_5_6_5")
334 target_link_libraries(${BINARY_NAME}_libretro m ${OS_LIB})
335endif()
336
337if(BUILD_SDL)
338 add_definitions(-DBUILD_SDL)
339 add_subdirectory(${CMAKE_SOURCE_DIR}/src/platform/sdl ${CMAKE_BINARY_DIR}/sdl)
340endif()
341
342if(BUILD_QT)
343 add_subdirectory(${CMAKE_SOURCE_DIR}/src/platform/qt ${CMAKE_BINARY_DIR}/qt)
344endif()
345
346if(BUILD_PERF)
347 set(PERF_SRC ${CMAKE_SOURCE_DIR}/src/platform/perf-main.c)
348 if(UNIX AND NOT APPLE)
349 list(APPEND PERF_LIB rt)
350 endif()
351
352 add_executable(${BINARY_NAME}-perf ${PERF_SRC})
353 target_link_libraries(${BINARY_NAME}-perf ${BINARY_NAME} ${PERF_LIB})
354 install(TARGETS ${BINARY_NAME}-perf DESTINATION bin COMPONENT ${BINARY_NAME}-perf)
355 install(FILES ${CMAKE_SOURCE_DIR}/tools/perf.py DESTINATION "${CMAKE_INSTALL_LIBDIR}/${BINARY_NAME}" COMPONENT ${BINARY_NAME}-perf)
356endif()
357
358# Packaging
359set(CPACK_PACKAGE_VERSION_MAJOR ${LIB_VERSION_MAJOR})
360set(CPACK_PACKAGE_VERSION_MINOR ${LIB_VERSION_MINOR})
361set(CPACK_PACKAGE_VERSION_PATCH ${LIB_VERSION_PATCH})
362set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE)
363set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.md)
364
365set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "mGBA Game Boy Advance Emulator")
366set(CPACK_PACKAGE_VENDOR "Jeffrey Pfau")
367set(CPACK_PACKAGE_CONTACT "Jeffrey Pfau <jeffrey@endrift.com>")
368set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
369set(CPACK_DEBIAN_PACKAGE_SECTION "games")
370
371SET(CPACK_DEB_COMPONENT_INSTALL ON)
372
373set(CPACK_STRIP_FILES ${BINARY_NAME})
374
375install(FILES ${CMAKE_SOURCE_DIR}/README.md ${CMAKE_SOURCE_DIR}/CHANGES DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib${BINARY_NAME})
376
377include(CPack)
378
379# Summaries
380message(STATUS "Feature summary:")
381message(STATUS " CLI debugger: ${USE_CLI_DEBUGGER}")
382message(STATUS " GDB stub: ${USE_GDB_STUB}")
383message(STATUS " Video recording: ${USE_FFMPEG}")
384message(STATUS " GIF recording: ${USE_MAGICK}")
385message(STATUS " Screenshot/advanced savestate support: ${USE_PNG}")
386message(STATUS " ZIP support: ${USE_LIBZIP}")
387message(STATUS " 7-Zip support: ${USE_LZMA}")
388message(STATUS " Better audio resampling: ${USE_BLIP}")
389message(STATUS "Frontend summary:")
390message(STATUS " Qt: ${BUILD_QT}")
391message(STATUS " SDL (${SDL_VERSION}): ${BUILD_SDL}")
392message(STATUS " Libretro core: ${BUILD_LIBRETRO}")
393message(STATUS " Profiling: ${BUILD_PERF}")
394message(STATUS "Library summary:")
395message(STATUS " Static: ${BUILD_STATIC}")
396message(STATUS " Shared: ${BUILD_SHARED}")