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
Package registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vlad Doc
SRB2
Commits
b4b19d63
Commit
b4b19d63
authored
Mar 5, 2015
by
Yukita Mayako
Browse files
Options
Downloads
Plain Diff
Merge branch 'cmake-use-outputdirs' of git@git.magicalgirl.moe:STJr/SRB2.git into ghost-networking
parents
889be7a8
3d5d61ee
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+6
-5
6 additions, 5 deletions
CMakeLists.txt
cmake/Modules/GitUtilities.cmake
+12
-3
12 additions, 3 deletions
cmake/Modules/GitUtilities.cmake
src/config.h.in
+2
-0
2 additions, 0 deletions
src/config.h.in
with
20 additions
and
8 deletions
CMakeLists.txt
+
6
−
5
View file @
b4b19d63
...
...
@@ -58,10 +58,6 @@ else()
set
(
SRB2_SYSTEM_BITS 32
)
endif
()
if
(
MSVC
)
message
(
WARNING
"!! MSVC BUILDS OF SRB2 CANNOT PLAY MULTIPLAYER !! You're more than welcome to try and fix this!"
)
endif
()
# OS macros
if
(
UNIX
)
add_definitions
(
-DUNIXCOMMON
)
...
...
@@ -85,6 +81,9 @@ if(${CMAKE_SYSTEM} MATCHES "Darwin")
endif
()
endif
()
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
"
${
CMAKE_BINARY_DIR
}
/bin"
)
set
(
CMAKE_PDB_OUTPUT_DIRECTORY
"
${
CMAKE_BINARY_DIR
}
/bin"
)
# Set EXE names so the assets CMakeLists can refer to its target
set
(
SRB2_SDL2_EXE_NAME srb2
)
set
(
SRB2_WIN_EXE_NAME srb2dd
)
...
...
@@ -98,7 +97,9 @@ add_subdirectory(assets)
## config.h generation
set
(
GIT_EXECUTABLE
"git"
CACHE FILEPATH
"Path to git binary"
)
include
(
GitUtilities
)
git_describe
(
SRB2_COMP_REVISION
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
)
git_describe
(
SRB2_GIT_DESCRIBE
"
${
CMAKE_SOURCE_DIR
}
"
)
git_current_branch
(
SRB2_GIT_BRANCH
"
${
CMAKE_SOURCE_DIR
}
"
)
set
(
SRB2_COMP_REVISION
"
${
SRB2_GIT_DESCRIBE
}
-<
${
SRB2_GIT_BRANCH
}
>"
)
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
−
3
View file @
b4b19d63
...
...
@@ -14,9 +14,18 @@ function(git_describe variable path)
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
#if(NOT result EQUAL 0)
# set(${variable} "GITERROR-${result}-NOTFOUND" CACHE STRING "revision" FORCE)
#endif()
set
(
${
variable
}
"
${
output
}
"
PARENT_SCOPE
)
endfunction
()
function
(
git_current_branch variable path
)
execute_process
(
COMMAND
${
GIT_EXECUTABLE
}
"symbolic-ref"
"--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
+
2
−
0
View file @
b4b19d63
...
...
@@ -12,6 +12,8 @@
#define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}"
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
#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