CMakeLists.txt 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. cmake_minimum_required(VERSION 3.7)
  2. list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
  3. list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules")
  4. include(DownloadExternals)
  5. include(CMakeDependentOption)
  6. project(yuzu)
  7. # Set bundled sdl2/qt as dependent options.
  8. # OFF by default, but if ENABLE_SDL2 and MSVC are true then ON
  9. option(ENABLE_SDL2 "Enable the SDL2 frontend" ON)
  10. CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF)
  11. option(ENABLE_QT "Enable the Qt frontend" ON)
  12. CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" ON "ENABLE_QT;MSVC" OFF)
  13. option(YUZU_USE_BUNDLED_UNICORN "Build/Download bundled Unicorn" ON)
  14. option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
  15. if(NOT EXISTS ${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit)
  16. message(STATUS "Copying pre-commit hook")
  17. file(COPY hooks/pre-commit
  18. DESTINATION ${CMAKE_SOURCE_DIR}/.git/hooks)
  19. endif()
  20. # Sanity check : Check that all submodules are present
  21. # =======================================================================
  22. function(check_submodules_present)
  23. file(READ "${CMAKE_SOURCE_DIR}/.gitmodules" gitmodules)
  24. string(REGEX MATCHALL "path *= *[^ \t\r\n]*" gitmodules ${gitmodules})
  25. foreach(module ${gitmodules})
  26. string(REGEX REPLACE "path *= *" "" module ${module})
  27. if (NOT EXISTS "${CMAKE_SOURCE_DIR}/${module}/.git")
  28. message(FATAL_ERROR "Git submodule ${module} not found. "
  29. "Please run: git submodule update --init --recursive")
  30. endif()
  31. endforeach()
  32. endfunction()
  33. check_submodules_present()
  34. configure_file(${CMAKE_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc
  35. ${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc
  36. COPYONLY)
  37. if (ENABLE_COMPATIBILITY_LIST_DOWNLOAD AND NOT EXISTS ${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.json)
  38. message(STATUS "Downloading compatibility list for yuzu...")
  39. file(DOWNLOAD
  40. https://api.yuzu-emu.org/gamedb/
  41. "${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.json" SHOW_PROGRESS)
  42. endif()
  43. if (NOT EXISTS ${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.json)
  44. file(WRITE ${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.json "")
  45. endif()
  46. # Detect current compilation architecture and create standard definitions
  47. # =======================================================================
  48. include(CheckSymbolExists)
  49. function(detect_architecture symbol arch)
  50. if (NOT DEFINED ARCHITECTURE)
  51. set(CMAKE_REQUIRED_QUIET 1)
  52. check_symbol_exists("${symbol}" "" ARCHITECTURE_${arch})
  53. unset(CMAKE_REQUIRED_QUIET)
  54. # The output variable needs to be unique across invocations otherwise
  55. # CMake's crazy scope rules will keep it defined
  56. if (ARCHITECTURE_${arch})
  57. set(ARCHITECTURE "${arch}" PARENT_SCOPE)
  58. set(ARCHITECTURE_${arch} 1 PARENT_SCOPE)
  59. add_definitions(-DARCHITECTURE_${arch}=1)
  60. endif()
  61. endif()
  62. endfunction()
  63. if (NOT ENABLE_GENERIC)
  64. if (MSVC)
  65. detect_architecture("_M_AMD64" x86_64)
  66. detect_architecture("_M_IX86" x86)
  67. detect_architecture("_M_ARM" ARM)
  68. detect_architecture("_M_ARM64" ARM64)
  69. else()
  70. detect_architecture("__x86_64__" x86_64)
  71. detect_architecture("__i386__" x86)
  72. detect_architecture("__arm__" ARM)
  73. detect_architecture("__aarch64__" ARM64)
  74. endif()
  75. endif()
  76. if (NOT DEFINED ARCHITECTURE)
  77. set(ARCHITECTURE "GENERIC")
  78. set(ARCHITECTURE_GENERIC 1)
  79. add_definitions(-DARCHITECTURE_GENERIC=1)
  80. endif()
  81. message(STATUS "Target architecture: ${ARCHITECTURE}")
  82. # Configure compilation flags
  83. # ===========================
  84. set(CMAKE_CXX_STANDARD 17)
  85. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  86. if (NOT MSVC)
  87. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
  88. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
  89. if (MINGW)
  90. add_definitions(-DMINGW_HAS_SECURE_API)
  91. if (MINGW_STATIC_BUILD)
  92. add_definitions(-DQT_STATICPLUGIN)
  93. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
  94. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
  95. endif()
  96. endif()
  97. else()
  98. # Silence "deprecation" warnings
  99. add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D_SCL_SECURE_NO_WARNINGS)
  100. # Avoid windows.h junk
  101. add_definitions(/DNOMINMAX)
  102. # Avoid windows.h from including some usually unused libs like winsocks.h, since this might cause some redefinition errors.
  103. add_definitions(/DWIN32_LEAN_AND_MEAN)
  104. # set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms)
  105. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
  106. set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE)
  107. # Tweak optimization settings
  108. # As far as I can tell, there's no way to override the CMake defaults while leaving user
  109. # changes intact, so we'll just clobber everything and say sorry.
  110. message(STATUS "Cache compiler flags ignored, please edit CMakeLists.txt to change the flags.")
  111. # /W3 - Level 3 warnings
  112. # /MP - Multi-threaded compilation
  113. # /Zi - Output debugging information
  114. # /Zo - enhanced debug info for optimized builds
  115. # /permissive- - enables stricter C++ standards conformance checks
  116. set(CMAKE_C_FLAGS "/W3 /MP /Zi /Zo /permissive-" CACHE STRING "" FORCE)
  117. # /EHsc - C++-only exception handling semantics
  118. # /Zc:throwingNew - let codegen assume `operator new` will never return null
  119. # /Zc:inline - let codegen omit inline functions in object files
  120. set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} /EHsc /std:c++latest /Zc:throwingNew,inline" CACHE STRING "" FORCE)
  121. # /MDd - Multi-threaded Debug Runtime DLL
  122. set(CMAKE_C_FLAGS_DEBUG "/Od /MDd" CACHE STRING "" FORCE)
  123. set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" CACHE STRING "" FORCE)
  124. # /O2 - Optimization level 2
  125. # /GS- - No stack buffer overflow checks
  126. # /MD - Multi-threaded runtime DLL
  127. set(CMAKE_C_FLAGS_RELEASE "/O2 /GS- /MD" CACHE STRING "" FORCE)
  128. set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "" FORCE)
  129. set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG /MANIFEST:NO" CACHE STRING "" FORCE)
  130. set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE)
  131. endif()
  132. # Fix GCC C++17 and Boost.ICL incompatibility (needed to build dynarmic)
  133. # See https://bugzilla.redhat.com/show_bug.cgi?id=1485641#c1
  134. if (CMAKE_COMPILER_IS_GNUCC)
  135. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-new-ttp-matching")
  136. endif()
  137. # Set file offset size to 64 bits.
  138. #
  139. # On modern Unixes, this is typically already the case. The lone exception is
  140. # glibc, which may default to 32 bits. glibc allows this to be configured
  141. # by setting _FILE_OFFSET_BITS.
  142. if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
  143. add_definitions(-D_FILE_OFFSET_BITS=64)
  144. endif()
  145. # CMake seems to only define _DEBUG on Windows
  146. set_property(DIRECTORY APPEND PROPERTY
  147. COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG> $<$<NOT:$<CONFIG:Debug>>:NDEBUG>)
  148. math(EXPR EMU_ARCH_BITS ${CMAKE_SIZEOF_VOID_P}*8)
  149. add_definitions(-DEMU_ARCH_BITS=${EMU_ARCH_BITS})
  150. # System imported libraries
  151. # ======================
  152. find_package(Boost 1.63.0 QUIET)
  153. if (NOT Boost_FOUND)
  154. message(STATUS "Boost 1.63.0 or newer not found, falling back to externals")
  155. set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/externals/boost")
  156. set(Boost_NO_SYSTEM_PATHS OFF)
  157. find_package(Boost QUIET REQUIRED)
  158. endif()
  159. # Output binaries to bin/
  160. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
  161. # Prefer the -pthread flag on Linux.
  162. set(THREADS_PREFER_PTHREAD_FLAG ON)
  163. find_package(Threads REQUIRED)
  164. if (ENABLE_SDL2)
  165. if (YUZU_USE_BUNDLED_SDL2)
  166. # Detect toolchain and platform
  167. if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) AND ARCHITECTURE_x86_64)
  168. set(SDL2_VER "SDL2-2.0.8")
  169. else()
  170. message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.")
  171. endif()
  172. if (DEFINED SDL2_VER)
  173. download_bundled_external("sdl2/" ${SDL2_VER} SDL2_PREFIX)
  174. endif()
  175. set(SDL2_FOUND YES)
  176. set(SDL2_INCLUDE_DIR "${SDL2_PREFIX}/include" CACHE PATH "Path to SDL2 headers")
  177. set(SDL2_LIBRARY "${SDL2_PREFIX}/lib/x64/SDL2.lib" CACHE PATH "Path to SDL2 library")
  178. set(SDL2_DLL_DIR "${SDL2_PREFIX}/lib/x64/" CACHE PATH "Path to SDL2.dll")
  179. else()
  180. find_package(SDL2 REQUIRED)
  181. endif()
  182. if (SDL2_FOUND)
  183. # TODO(yuriks): Make FindSDL2.cmake export an IMPORTED library instead
  184. add_library(SDL2 INTERFACE)
  185. target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}")
  186. target_include_directories(SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
  187. endif()
  188. else()
  189. set(SDL2_FOUND NO)
  190. endif()
  191. # If unicorn isn't found, msvc -> download bundled unicorn; everyone else -> build external
  192. if (YUZU_USE_BUNDLED_UNICORN)
  193. if (MSVC)
  194. message(STATUS "unicorn not found, falling back to bundled")
  195. # Detect toolchain and platform
  196. if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) AND ARCHITECTURE_x86_64)
  197. set(UNICORN_VER "unicorn-yuzu")
  198. else()
  199. message(FATAL_ERROR "No bundled Unicorn binaries for your toolchain. Disable YUZU_USE_BUNDLED_UNICORN and provide your own.")
  200. endif()
  201. if (DEFINED UNICORN_VER)
  202. download_bundled_external("unicorn/" ${UNICORN_VER} UNICORN_PREFIX)
  203. endif()
  204. if (DEFINED UNICORN_VER)
  205. download_bundled_external("unicorn/" ${UNICORN_VER} UNICORN_PREFIX)
  206. endif()
  207. set(UNICORN_FOUND YES)
  208. set(LIBUNICORN_INCLUDE_DIR "${UNICORN_PREFIX}/include" CACHE PATH "Path to Unicorn headers" FORCE)
  209. set(LIBUNICORN_LIBRARY "${UNICORN_PREFIX}/lib/x64/unicorn_dynload.lib" CACHE PATH "Path to Unicorn library" FORCE)
  210. set(UNICORN_DLL_DIR "${UNICORN_PREFIX}/lib/x64/" CACHE PATH "Path to unicorn.dll" FORCE)
  211. else()
  212. message(STATUS "unicorn not found, falling back to externals")
  213. if (MINGW)
  214. set(UNICORN_LIB_NAME "unicorn.a")
  215. else()
  216. set(UNICORN_LIB_NAME "libunicorn.a")
  217. endif()
  218. set(UNICORN_FOUND YES)
  219. set(UNICORN_PREFIX ${CMAKE_SOURCE_DIR}/externals/unicorn)
  220. set(LIBUNICORN_LIBRARY "${UNICORN_PREFIX}/${UNICORN_LIB_NAME}" CACHE PATH "Path to Unicorn library" FORCE)
  221. set(LIBUNICORN_INCLUDE_DIR "${UNICORN_PREFIX}/include" CACHE PATH "Path to Unicorn headers" FORCE)
  222. set(UNICORN_DLL_DIR "${UNICORN_PREFIX}/" CACHE PATH "Path to unicorn dynamic library" FORCE)
  223. find_package(PythonInterp 2.7 REQUIRED)
  224. add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY}
  225. COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh macos-universal-no
  226. WORKING_DIRECTORY ${UNICORN_PREFIX}
  227. )
  228. # ALL makes this custom target build every time
  229. # but it won't actually build if LIBUNICORN_LIBRARY is up to date
  230. add_custom_target(unicorn-build ALL
  231. DEPENDS ${LIBUNICORN_LIBRARY}
  232. )
  233. unset(UNICORN_LIB_NAME)
  234. endif()
  235. else()
  236. find_package(Unicorn REQUIRED)
  237. endif()
  238. if (UNICORN_FOUND)
  239. add_library(unicorn INTERFACE)
  240. target_link_libraries(unicorn INTERFACE "${LIBUNICORN_LIBRARY}")
  241. target_include_directories(unicorn INTERFACE "${LIBUNICORN_INCLUDE_DIR}")
  242. else()
  243. message(FATAL_ERROR "Could not find or build unicorn which is required.")
  244. endif()
  245. if (ENABLE_QT)
  246. if (YUZU_USE_BUNDLED_QT)
  247. if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) AND ARCHITECTURE_x86_64)
  248. set(QT_VER qt-5.10.0-msvc2015_64)
  249. else()
  250. message(FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable YUZU_USE_BUNDLED_QT and provide your own.")
  251. endif()
  252. if (DEFINED QT_VER)
  253. download_bundled_external("qt/" ${QT_VER} QT_PREFIX)
  254. endif()
  255. set(QT_PREFIX_HINT HINTS "${QT_PREFIX}")
  256. else()
  257. # Passing an empty HINTS seems to cause default system paths to get ignored in CMake 2.8 so
  258. # make sure to not pass anything if we don't have one.
  259. set(QT_PREFIX_HINT)
  260. endif()
  261. find_package(Qt5 REQUIRED COMPONENTS Widgets OpenGL ${QT_PREFIX_HINT})
  262. endif()
  263. # Platform-specific library requirements
  264. # ======================================
  265. IF (APPLE)
  266. find_library(COCOA_LIBRARY Cocoa) # Umbrella framework for everything GUI-related
  267. set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY})
  268. if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
  269. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
  270. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
  271. endif()
  272. ELSEIF (WIN32)
  273. # WSAPoll and SHGetKnownFolderPath (AppData/Roaming) didn't exist before WinNT 6.x (Vista)
  274. add_definitions(-D_WIN32_WINNT=0x0600 -DWINVER=0x0600)
  275. set(PLATFORM_LIBRARIES winmm ws2_32)
  276. IF (MINGW)
  277. # PSAPI is the Process Status API
  278. set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} psapi imm32 version)
  279. ENDIF (MINGW)
  280. ELSEIF (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU|SunOS)$")
  281. set(PLATFORM_LIBRARIES rt)
  282. ENDIF (APPLE)
  283. # MINGW: GCC does not support codecvt, so use iconv instead
  284. if (UNIX OR MINGW)
  285. find_library(ICONV_LIBRARY NAMES iconv)
  286. if (ICONV_LIBRARY)
  287. list(APPEND PLATFORM_LIBRARIES ${ICONV_LIBRARY})
  288. endif()
  289. endif()
  290. # Setup a custom clang-format target (if clang-format can be found) that will run
  291. # against all the src files. This should be used before making a pull request.
  292. # =======================================================================
  293. set(CLANG_FORMAT_POSTFIX "-6.0")
  294. find_program(CLANG_FORMAT
  295. NAMES clang-format${CLANG_FORMAT_POSTFIX}
  296. clang-format
  297. PATHS ${CMAKE_BINARY_DIR}/externals)
  298. # if find_program doesn't find it, try to download from externals
  299. if (NOT CLANG_FORMAT)
  300. if (WIN32)
  301. message(STATUS "Clang format not found! Downloading...")
  302. set(CLANG_FORMAT "${CMAKE_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe")
  303. file(DOWNLOAD
  304. https://github.com/yuzu-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
  305. "${CLANG_FORMAT}" SHOW_PROGRESS
  306. STATUS DOWNLOAD_SUCCESS)
  307. if (NOT DOWNLOAD_SUCCESS EQUAL 0)
  308. message(WARNING "Could not download clang format! Disabling the clang format target")
  309. file(REMOVE ${CLANG_FORMAT})
  310. unset(CLANG_FORMAT)
  311. endif()
  312. else()
  313. message(WARNING "Clang format not found! Disabling the clang format target")
  314. endif()
  315. endif()
  316. if (CLANG_FORMAT)
  317. set(SRCS ${CMAKE_SOURCE_DIR}/src)
  318. set(CCOMMENT "Running clang format against all the .h and .cpp files in src/")
  319. if (WIN32)
  320. add_custom_target(clang-format
  321. COMMAND powershell.exe -Command "${CLANG_FORMAT} -i @(Get-ChildItem -Recurse ${SRCS}/* -Include \'*.h\', \'*.cpp\')"
  322. COMMENT ${CCOMMENT})
  323. elseif(MINGW)
  324. add_custom_target(clang-format
  325. COMMAND find `cygpath -u ${SRCS}` -iname *.h -o -iname *.cpp | xargs `cygpath -u ${CLANG_FORMAT}` -i
  326. COMMENT ${CCOMMENT})
  327. else()
  328. add_custom_target(clang-format
  329. COMMAND find ${SRCS} -iname *.h -o -iname *.cpp | xargs ${CLANG_FORMAT} -i
  330. COMMENT ${CCOMMENT})
  331. endif()
  332. unset(SRCS)
  333. unset(CCOMMENT)
  334. endif()
  335. # Include source code
  336. # ===================
  337. # This function should be passed a list of all files in a target. It will automatically generate
  338. # file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
  339. # one in the filesystem.
  340. function(create_target_directory_groups target_name)
  341. # Place any files that aren't in the source list in a separate group so that they don't get in
  342. # the way.
  343. source_group("Other Files" REGULAR_EXPRESSION ".")
  344. get_target_property(target_sources "${target_name}" SOURCES)
  345. foreach(file_name IN LISTS target_sources)
  346. get_filename_component(dir_name "${file_name}" PATH)
  347. # Group names use '\' as a separator even though the entire rest of CMake uses '/'...
  348. string(REPLACE "/" "\\" group_name "${dir_name}")
  349. source_group("${group_name}" FILES "${file_name}")
  350. endforeach()
  351. endfunction()
  352. # Gets a UTC timstamp and sets the provided variable to it
  353. function(get_timestamp _var)
  354. string(TIMESTAMP timestamp UTC)
  355. set(${_var} "${timestamp}" PARENT_SCOPE)
  356. endfunction()
  357. # generate git/build information
  358. include(GetGitRevisionDescription)
  359. get_git_head_revision(GIT_REF_SPEC GIT_REV)
  360. git_describe(GIT_DESC --always --long --dirty)
  361. git_branch_name(GIT_BRANCH)
  362. get_timestamp(BUILD_DATE)
  363. enable_testing()
  364. add_subdirectory(externals)
  365. add_subdirectory(src)
  366. # Installation instructions
  367. # =========================
  368. # Install freedesktop.org metadata files, following those specifications:
  369. # http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
  370. # http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
  371. # http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
  372. if(ENABLE_QT AND UNIX AND NOT APPLE)
  373. install(FILES "${CMAKE_SOURCE_DIR}/dist/yuzu.desktop"
  374. DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
  375. install(FILES "${CMAKE_SOURCE_DIR}/dist/yuzu.svg"
  376. DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps")
  377. install(FILES "${CMAKE_SOURCE_DIR}/dist/yuzu.xml"
  378. DESTINATION "${CMAKE_INSTALL_PREFIX}/share/mime/packages")
  379. endif()