diff options
| -rw-r--r-- | CMakeLists.txt | 38 | ||||
| -rw-r--r-- | src/web_service/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/yuzu/CMakeLists.txt | 8 |
3 files changed, 24 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f6a67950d..918cf5372 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -23,21 +23,21 @@ option(ENABLE_CUBEB "Enables the cubeb audio backend" ON) | |||
| 23 | 23 | ||
| 24 | option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF) | 24 | option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF) |
| 25 | 25 | ||
| 26 | if(NOT EXISTS ${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit) | 26 | if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit) |
| 27 | message(STATUS "Copying pre-commit hook") | 27 | message(STATUS "Copying pre-commit hook") |
| 28 | file(COPY hooks/pre-commit | 28 | file(COPY hooks/pre-commit |
| 29 | DESTINATION ${CMAKE_SOURCE_DIR}/.git/hooks) | 29 | DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks) |
| 30 | endif() | 30 | endif() |
| 31 | 31 | ||
| 32 | # Sanity check : Check that all submodules are present | 32 | # Sanity check : Check that all submodules are present |
| 33 | # ======================================================================= | 33 | # ======================================================================= |
| 34 | 34 | ||
| 35 | function(check_submodules_present) | 35 | function(check_submodules_present) |
| 36 | file(READ "${CMAKE_SOURCE_DIR}/.gitmodules" gitmodules) | 36 | file(READ "${PROJECT_SOURCE_DIR}/.gitmodules" gitmodules) |
| 37 | string(REGEX MATCHALL "path *= *[^ \t\r\n]*" gitmodules ${gitmodules}) | 37 | string(REGEX MATCHALL "path *= *[^ \t\r\n]*" gitmodules ${gitmodules}) |
| 38 | foreach(module ${gitmodules}) | 38 | foreach(module ${gitmodules}) |
| 39 | string(REGEX REPLACE "path *= *" "" module ${module}) | 39 | string(REGEX REPLACE "path *= *" "" module ${module}) |
| 40 | if (NOT EXISTS "${CMAKE_SOURCE_DIR}/${module}/.git") | 40 | if (NOT EXISTS "${PROJECT_SOURCE_DIR}/${module}/.git") |
| 41 | message(FATAL_ERROR "Git submodule ${module} not found. " | 41 | message(FATAL_ERROR "Git submodule ${module} not found. " |
| 42 | "Please run: git submodule update --init --recursive") | 42 | "Please run: git submodule update --init --recursive") |
| 43 | endif() | 43 | endif() |
| @@ -45,17 +45,17 @@ function(check_submodules_present) | |||
| 45 | endfunction() | 45 | endfunction() |
| 46 | check_submodules_present() | 46 | check_submodules_present() |
| 47 | 47 | ||
| 48 | configure_file(${CMAKE_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc | 48 | configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc |
| 49 | ${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc | 49 | ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc |
| 50 | COPYONLY) | 50 | COPYONLY) |
| 51 | if (ENABLE_COMPATIBILITY_LIST_DOWNLOAD AND NOT EXISTS ${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.json) | 51 | if (ENABLE_COMPATIBILITY_LIST_DOWNLOAD AND NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json) |
| 52 | message(STATUS "Downloading compatibility list for yuzu...") | 52 | message(STATUS "Downloading compatibility list for yuzu...") |
| 53 | file(DOWNLOAD | 53 | file(DOWNLOAD |
| 54 | https://api.yuzu-emu.org/gamedb/ | 54 | https://api.yuzu-emu.org/gamedb/ |
| 55 | "${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.json" SHOW_PROGRESS) | 55 | "${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json" SHOW_PROGRESS) |
| 56 | endif() | 56 | endif() |
| 57 | if (NOT EXISTS ${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.json) | 57 | if (NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json) |
| 58 | file(WRITE ${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.json "") | 58 | file(WRITE ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json "") |
| 59 | endif() | 59 | endif() |
| 60 | 60 | ||
| 61 | # Detect current compilation architecture and create standard definitions | 61 | # Detect current compilation architecture and create standard definitions |
| @@ -185,13 +185,13 @@ find_package(Boost 1.63.0 QUIET) | |||
| 185 | if (NOT Boost_FOUND) | 185 | if (NOT Boost_FOUND) |
| 186 | message(STATUS "Boost 1.63.0 or newer not found, falling back to externals") | 186 | message(STATUS "Boost 1.63.0 or newer not found, falling back to externals") |
| 187 | 187 | ||
| 188 | set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/externals/boost") | 188 | set(BOOST_ROOT "${PROJECT_SOURCE_DIR}/externals/boost") |
| 189 | set(Boost_NO_SYSTEM_PATHS OFF) | 189 | set(Boost_NO_SYSTEM_PATHS OFF) |
| 190 | find_package(Boost QUIET REQUIRED) | 190 | find_package(Boost QUIET REQUIRED) |
| 191 | endif() | 191 | endif() |
| 192 | 192 | ||
| 193 | # Output binaries to bin/ | 193 | # Output binaries to bin/ |
| 194 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | 194 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) |
| 195 | 195 | ||
| 196 | # Prefer the -pthread flag on Linux. | 196 | # Prefer the -pthread flag on Linux. |
| 197 | set(THREADS_PREFER_PTHREAD_FLAG ON) | 197 | set(THREADS_PREFER_PTHREAD_FLAG ON) |
| @@ -260,7 +260,7 @@ if (YUZU_USE_BUNDLED_UNICORN) | |||
| 260 | endif() | 260 | endif() |
| 261 | 261 | ||
| 262 | set(UNICORN_FOUND YES) | 262 | set(UNICORN_FOUND YES) |
| 263 | set(UNICORN_PREFIX ${CMAKE_SOURCE_DIR}/externals/unicorn) | 263 | set(UNICORN_PREFIX ${PROJECT_SOURCE_DIR}/externals/unicorn) |
| 264 | set(LIBUNICORN_LIBRARY "${UNICORN_PREFIX}/${UNICORN_LIB_NAME}" CACHE PATH "Path to Unicorn library" FORCE) | 264 | set(LIBUNICORN_LIBRARY "${UNICORN_PREFIX}/${UNICORN_LIB_NAME}" CACHE PATH "Path to Unicorn library" FORCE) |
| 265 | set(LIBUNICORN_INCLUDE_DIR "${UNICORN_PREFIX}/include" CACHE PATH "Path to Unicorn headers" FORCE) | 265 | set(LIBUNICORN_INCLUDE_DIR "${UNICORN_PREFIX}/include" CACHE PATH "Path to Unicorn headers" FORCE) |
| 266 | set(UNICORN_DLL_DIR "${UNICORN_PREFIX}/" CACHE PATH "Path to unicorn dynamic library" FORCE) | 266 | set(UNICORN_DLL_DIR "${UNICORN_PREFIX}/" CACHE PATH "Path to unicorn dynamic library" FORCE) |
| @@ -352,12 +352,12 @@ set(CLANG_FORMAT_POSTFIX "-6.0") | |||
| 352 | find_program(CLANG_FORMAT | 352 | find_program(CLANG_FORMAT |
| 353 | NAMES clang-format${CLANG_FORMAT_POSTFIX} | 353 | NAMES clang-format${CLANG_FORMAT_POSTFIX} |
| 354 | clang-format | 354 | clang-format |
| 355 | PATHS ${CMAKE_BINARY_DIR}/externals) | 355 | PATHS ${PROJECT_BINARY_DIR}/externals) |
| 356 | # if find_program doesn't find it, try to download from externals | 356 | # if find_program doesn't find it, try to download from externals |
| 357 | if (NOT CLANG_FORMAT) | 357 | if (NOT CLANG_FORMAT) |
| 358 | if (WIN32) | 358 | if (WIN32) |
| 359 | message(STATUS "Clang format not found! Downloading...") | 359 | message(STATUS "Clang format not found! Downloading...") |
| 360 | set(CLANG_FORMAT "${CMAKE_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe") | 360 | set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe") |
| 361 | file(DOWNLOAD | 361 | file(DOWNLOAD |
| 362 | https://github.com/yuzu-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe | 362 | https://github.com/yuzu-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe |
| 363 | "${CLANG_FORMAT}" SHOW_PROGRESS | 363 | "${CLANG_FORMAT}" SHOW_PROGRESS |
| @@ -373,7 +373,7 @@ if (NOT CLANG_FORMAT) | |||
| 373 | endif() | 373 | endif() |
| 374 | 374 | ||
| 375 | if (CLANG_FORMAT) | 375 | if (CLANG_FORMAT) |
| 376 | set(SRCS ${CMAKE_SOURCE_DIR}/src) | 376 | set(SRCS ${PROJECT_SOURCE_DIR}/src) |
| 377 | set(CCOMMENT "Running clang format against all the .h and .cpp files in src/") | 377 | set(CCOMMENT "Running clang format against all the .h and .cpp files in src/") |
| 378 | if (WIN32) | 378 | if (WIN32) |
| 379 | add_custom_target(clang-format | 379 | add_custom_target(clang-format |
| @@ -446,10 +446,10 @@ endif() | |||
| 446 | # http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html | 446 | # http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html |
| 447 | # http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html | 447 | # http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html |
| 448 | if(ENABLE_QT AND UNIX AND NOT APPLE) | 448 | if(ENABLE_QT AND UNIX AND NOT APPLE) |
| 449 | install(FILES "${CMAKE_SOURCE_DIR}/dist/yuzu.desktop" | 449 | install(FILES "${PROJECT_SOURCE_DIR}/dist/yuzu.desktop" |
| 450 | DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications") | 450 | DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications") |
| 451 | install(FILES "${CMAKE_SOURCE_DIR}/dist/yuzu.svg" | 451 | install(FILES "${PROJECT_SOURCE_DIR}/dist/yuzu.svg" |
| 452 | DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps") | 452 | DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps") |
| 453 | install(FILES "${CMAKE_SOURCE_DIR}/dist/yuzu.xml" | 453 | install(FILES "${PROJECT_SOURCE_DIR}/dist/yuzu.xml" |
| 454 | DESTINATION "${CMAKE_INSTALL_PREFIX}/share/mime/packages") | 454 | DESTINATION "${CMAKE_INSTALL_PREFIX}/share/mime/packages") |
| 455 | endif() | 455 | endif() |
diff --git a/src/web_service/CMakeLists.txt b/src/web_service/CMakeLists.txt index 9ad75e74a..01f2d129d 100644 --- a/src/web_service/CMakeLists.txt +++ b/src/web_service/CMakeLists.txt | |||
| @@ -10,7 +10,7 @@ add_library(web_service STATIC | |||
| 10 | create_target_directory_groups(web_service) | 10 | create_target_directory_groups(web_service) |
| 11 | 11 | ||
| 12 | get_directory_property(OPENSSL_LIBS | 12 | get_directory_property(OPENSSL_LIBS |
| 13 | DIRECTORY ${CMAKE_SOURCE_DIR}/externals/libressl | 13 | DIRECTORY ${PROJECT_SOURCE_DIR}/externals/libressl |
| 14 | DEFINITION OPENSSL_LIBS) | 14 | DEFINITION OPENSSL_LIBS) |
| 15 | target_compile_definitions(web_service PRIVATE -DCPPHTTPLIB_OPENSSL_SUPPORT) | 15 | target_compile_definitions(web_service PRIVATE -DCPPHTTPLIB_OPENSSL_SUPPORT) |
| 16 | target_link_libraries(web_service PRIVATE common json-headers ${OPENSSL_LIBS} httplib lurlparser) | 16 | target_link_libraries(web_service PRIVATE common json-headers ${OPENSSL_LIBS} httplib lurlparser) |
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index b901c29d2..9379d9110 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt | |||
| @@ -82,10 +82,10 @@ set(UIS | |||
| 82 | ) | 82 | ) |
| 83 | 83 | ||
| 84 | file(GLOB COMPAT_LIST | 84 | file(GLOB COMPAT_LIST |
| 85 | ${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc | 85 | ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc |
| 86 | ${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.json) | 86 | ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json) |
| 87 | file(GLOB_RECURSE ICONS ${CMAKE_SOURCE_DIR}/dist/icons/*) | 87 | file(GLOB_RECURSE ICONS ${PROJECT_SOURCE_DIR}/dist/icons/*) |
| 88 | file(GLOB_RECURSE THEMES ${CMAKE_SOURCE_DIR}/dist/qt_themes/*) | 88 | file(GLOB_RECURSE THEMES ${PROJECT_SOURCE_DIR}/dist/qt_themes/*) |
| 89 | 89 | ||
| 90 | qt5_wrap_ui(UI_HDRS ${UIS}) | 90 | qt5_wrap_ui(UI_HDRS ${UIS}) |
| 91 | 91 | ||