Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
fbb2cde8
Commit
fbb2cde8
authored
6 years ago
by
SteelT
Browse files
Options
Downloads
Patches
Plain Diff
Make this be consistent with non-CMake builds
parent
1b6ec9fd
No related branches found
No related tags found
2 merge requests
!488
Merge in next and don't billboard papersprites in GL
,
!360
CMake:Use commit hash and branch name.
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+2
-2
2 additions, 2 deletions
CMakeLists.txt
cmake/Modules/GitUtilities.cmake
+12
-0
12 additions, 0 deletions
cmake/Modules/GitUtilities.cmake
src/config.h.in
+0
-2
0 additions, 2 deletions
src/config.h.in
with
14 additions
and
4 deletions
CMakeLists.txt
+
2
−
2
View file @
fbb2cde8
...
...
@@ -98,10 +98,10 @@ add_subdirectory(assets)
## config.h generation
set
(
GIT_EXECUTABLE
"git"
CACHE FILEPATH
"Path to git binary"
)
include
(
GitUtilities
)
git_
describe
(
SRB2_GIT_DESCRIBE
"
${
CMAKE_SOURCE_DIR
}
"
)
git_
latest_commit
(
SRB2_COMP_COMMIT
"
${
CMAKE_SOURCE_DIR
}
"
)
git_current_branch
(
SRB2_GIT_BRANCH
"
${
CMAKE_SOURCE_DIR
}
"
)
set
(
SRB2_COMP_BRANCH
"
${
SRB2_GIT_BRANCH
}
"
)
set
(
SRB2_COMP_REVISION
"
${
SRB2_
GIT_DESCRIBE
}
"
)
set
(
SRB2_COMP_REVISION
"
${
SRB2_
COMP_COMMIT
}
"
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/config.h.in
${
CMAKE_CURRENT_BINARY_DIR
}
/src/config.h
)
##### PACKAGE CONFIGURATION #####
...
...
This diff is collapsed.
Click to expand it.
cmake/Modules/GitUtilities.cmake
+
12
−
0
View file @
fbb2cde8
...
...
@@ -27,5 +27,17 @@ function(git_current_branch variable path)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set
(
${
variable
}
"
${
output
}
"
PARENT_SCOPE
)
endfunction
()
function
(
git_latest_commit variable path
)
execute_process
(
COMMAND
${
GIT_EXECUTABLE
}
"rev-parse"
"--short"
"HEAD"
WORKING_DIRECTORY
"
${
path
}
"
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set
(
${
variable
}
"
${
output
}
"
PARENT_SCOPE
)
endfunction
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/config.h.in
+
0
−
2
View file @
fbb2cde8
...
...
@@ -21,8 +21,6 @@
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
#define SRB2_COMP_BRANCH "${SRB2_COMP_BRANCH}"
#define SRB2_GIT_DESCRIBE "${SRB2_GIT_DESCRIBE}"
#define SRB2_GIT_BRANCH "${SRB2_GIT_BRANCH}"
#define CMAKE_ASSETS_DIR "${CMAKE_SOURCE_DIR}/assets"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment