all repos — mgba @ bdf6d7f7ec86fa7e8d934333455f44ceb53b2b2e

mGBA Game Boy Advance Emulator

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