diff options
Diffstat (limited to 'src/common/CMakeLists.txt')
| -rw-r--r-- | src/common/CMakeLists.txt | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index a7a4a688c..8a6170257 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt | |||
| @@ -1,4 +1,27 @@ | |||
| 1 | # Generate cpp with Git revision from template | 1 | # Generate cpp with Git revision from template |
| 2 | # Also if this is a CI build, add the build name (ie: Nightly, Bleeding Edge) to the scm_rev file as well | ||
| 3 | set(REPO_NAME "") | ||
| 4 | if ($ENV{CI}) | ||
| 5 | if ($ENV{TRAVIS}) | ||
| 6 | set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG}) | ||
| 7 | elseif($ENV{APPVEYOR}) | ||
| 8 | set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME}) | ||
| 9 | endif() | ||
| 10 | # regex capture the string nightly or bleeding-edge into CMAKE_MATCH_1 | ||
| 11 | string(REGEX MATCH "citra-emu/citra-?(.*)" OUTVAR ${BUILD_REPOSITORY}) | ||
| 12 | if (${CMAKE_MATCH_COUNT} GREATER 0) | ||
| 13 | # capitalize the first letter of each word in the repo name. | ||
| 14 | string(REPLACE "-" ";" REPO_NAME_LIST ${CMAKE_MATCH_1}) | ||
| 15 | foreach(WORD ${REPO_NAME_LIST}) | ||
| 16 | string(SUBSTRING ${WORD} 0 1 FIRST_LETTER) | ||
| 17 | string(SUBSTRING ${WORD} 1 -1 REMAINDER) | ||
| 18 | string(TOUPPER ${FIRST_LETTER} FIRST_LETTER) | ||
| 19 | # this leaves a trailing space on the last word, but we actually want that | ||
| 20 | # because of how its styled in the title bar. | ||
| 21 | set(REPO_NAME "${REPO_NAME}${FIRST_LETTER}${REMAINDER} ") | ||
| 22 | endforeach() | ||
| 23 | endif() | ||
| 24 | endif() | ||
| 2 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp" @ONLY) | 25 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp" @ONLY) |
| 3 | 26 | ||
| 4 | set(SRCS | 27 | set(SRCS |
| @@ -12,7 +35,6 @@ set(SRCS | |||
| 12 | memory_util.cpp | 35 | memory_util.cpp |
| 13 | microprofile.cpp | 36 | microprofile.cpp |
| 14 | misc.cpp | 37 | misc.cpp |
| 15 | profiler.cpp | ||
| 16 | scm_rev.cpp | 38 | scm_rev.cpp |
| 17 | string_util.cpp | 39 | string_util.cpp |
| 18 | symbols.cpp | 40 | symbols.cpp |
| @@ -45,7 +67,6 @@ set(HEADERS | |||
| 45 | microprofile.h | 67 | microprofile.h |
| 46 | microprofileui.h | 68 | microprofileui.h |
| 47 | platform.h | 69 | platform.h |
| 48 | profiler_reporting.h | ||
| 49 | quaternion.h | 70 | quaternion.h |
| 50 | scm_rev.h | 71 | scm_rev.h |
| 51 | scope_exit.h | 72 | scope_exit.h |
| @@ -61,14 +82,11 @@ set(HEADERS | |||
| 61 | 82 | ||
| 62 | if(ARCHITECTURE_x86_64) | 83 | if(ARCHITECTURE_x86_64) |
| 63 | set(SRCS ${SRCS} | 84 | set(SRCS ${SRCS} |
| 64 | x64/abi.cpp | ||
| 65 | x64/cpu_detect.cpp | 85 | x64/cpu_detect.cpp |
| 66 | x64/emitter.cpp) | 86 | ) |
| 67 | 87 | ||
| 68 | set(HEADERS ${HEADERS} | 88 | set(HEADERS ${HEADERS} |
| 69 | x64/abi.h | ||
| 70 | x64/cpu_detect.h | 89 | x64/cpu_detect.h |
| 71 | x64/emitter.h | ||
| 72 | x64/xbyak_abi.h | 90 | x64/xbyak_abi.h |
| 73 | x64/xbyak_util.h | 91 | x64/xbyak_util.h |
| 74 | ) | 92 | ) |