Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
RingRacers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dr_Nope
RingRacers
Commits
502de28d
Commit
502de28d
authored
4 years ago
by
Marco Z
Browse files
Options
Downloads
Patches
Plain Diff
CMAKE improvements: optional asset install; exe.debug for RelWithDebInfo
parent
c74eed0a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-0
1 addition, 0 deletions
CMakeLists.txt
assets/CMakeLists.txt
+21
-11
21 additions, 11 deletions
assets/CMakeLists.txt
src/sdl/CMakeLists.txt
+15
-5
15 additions, 5 deletions
src/sdl/CMakeLists.txt
with
37 additions
and
16 deletions
CMakeLists.txt
+
1
−
0
View file @
502de28d
...
@@ -131,4 +131,5 @@ set(CPACK_PACKAGE_VERSION_MAJOR ${SRB2_VERSION_MAJOR})
...
@@ -131,4 +131,5 @@ set(CPACK_PACKAGE_VERSION_MAJOR ${SRB2_VERSION_MAJOR})
set
(
CPACK_PACKAGE_VERSION_MINOR
${
SRB2_VERSION_MINOR
}
)
set
(
CPACK_PACKAGE_VERSION_MINOR
${
SRB2_VERSION_MINOR
}
)
set
(
CPACK_PACKAGE_VERSION_PATCH
${
SRB2_VERSION_PATCH
}
)
set
(
CPACK_PACKAGE_VERSION_PATCH
${
SRB2_VERSION_PATCH
}
)
set
(
CPACK_PACKAGE_INSTALL_DIRECTORY
"CMake
${
CMAKE_VERSION_MAJOR
}
.
${
CMAKE_VERSION_MINOR
}
"
)
set
(
CPACK_PACKAGE_INSTALL_DIRECTORY
"CMake
${
CMAKE_VERSION_MAJOR
}
.
${
CMAKE_VERSION_MINOR
}
"
)
SET
(
CPACK_OUTPUT_FILE_PREFIX package
)
include
(
CPack
)
include
(
CPack
)
This diff is collapsed.
Click to expand it.
assets/CMakeLists.txt
+
21
−
11
View file @
502de28d
...
@@ -12,6 +12,9 @@ ENDFUNCTION(PREPEND)
...
@@ -12,6 +12,9 @@ ENDFUNCTION(PREPEND)
set
(
SRB2_ASSET_DIRECTORY
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/installer"
set
(
SRB2_ASSET_DIRECTORY
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/installer"
CACHE STRING
"Path to directory that contains all asset files for the installer."
)
CACHE STRING
"Path to directory that contains all asset files for the installer."
)
set
(
SRB2_ASSET_INSTALL ON
CACHE BOOL
"Insert asset files into the install directory or package."
)
####################
####################
# POST-V2.2 NOTE: Do not forget to add patch.pk3 to the end of this list!
# POST-V2.2 NOTE: Do not forget to add patch.pk3 to the end of this list!
####################
####################
...
@@ -43,20 +46,27 @@ endforeach()
...
@@ -43,20 +46,27 @@ endforeach()
if
(
${
CMAKE_SYSTEM
}
MATCHES Darwin
)
if
(
${
CMAKE_SYSTEM
}
MATCHES Darwin
)
get_target_property
(
outname SRB2SDL2 OUTPUT_NAME
)
get_target_property
(
outname SRB2SDL2 OUTPUT_NAME
)
install
(
DIRECTORY
"
${
SRB2_ASSET_DIRECTORY
}
/"
if
(
${
SRB2_ASSET_INSTALL
}
)
DESTINATION
"
${
outname
}
.app/Contents/Resources"
install
(
DIRECTORY
"
${
SRB2_ASSET_DIRECTORY
}
/"
)
DESTINATION
"
${
outname
}
.app/Contents/Resources"
)
endif
()
# Always install the doc files, even in non-asset packages.
install
(
FILES
${
SRB2_ASSET_DOCS
}
install
(
FILES
${
SRB2_ASSET_DOCS
}
DESTINATION .
DESTINATION .
OPTIONAL
OPTIONAL
)
)
else
()
else
()
install
(
DIRECTORY
"
${
SRB2_ASSET_DIRECTORY
}
/"
if
(
${
SRB2_ASSET_INSTALL
}
)
DESTINATION .
install
(
DIRECTORY
"
${
SRB2_ASSET_DIRECTORY
}
/"
)
DESTINATION .
# Docs are assumed to be located in SRB2_ASSET_DIRECTORY, so don't install again
)
#install(FILES ${SRB2_ASSET_DOCS}
# Docs are assumed to be located in SRB2_ASSET_DIRECTORY, so don't install them in their own call.
# DESTINATION .
else
()
# OPTIONAL
# Always install the doc files, even in non-asset packages.
#)
install
(
FILES
${
SRB2_ASSET_DOCS
}
DESTINATION .
OPTIONAL
)
endif
()
endif
()
endif
()
This diff is collapsed.
Click to expand it.
src/sdl/CMakeLists.txt
+
15
−
5
View file @
502de28d
...
@@ -269,14 +269,18 @@ if(${SDL2_FOUND})
...
@@ -269,14 +269,18 @@ if(${SDL2_FOUND})
-DHAVE_SDL
-DHAVE_SDL
)
)
## strip debug symbols into separate file when using gcc
## strip debug symbols into separate file when using gcc.
if
(
CMAKE_COMPILER_IS_GNUCC
)
## to be consistent with Makefile, don't generate for OS X.
if
(
${
CMAKE_BUILD_TYPE
}
MATCHES Debug
)
if
((
CMAKE_COMPILER_IS_GNUCC
)
AND
NOT
(
${
CMAKE_SYSTEM
}
MATCHES Darwin
))
if
((
${
CMAKE_BUILD_TYPE
}
MATCHES Debug
)
OR
(
${
CMAKE_BUILD_TYPE
}
MATCHES RelWithDebInfo
))
if
(
${
CMAKE_BUILD_TYPE
}
MATCHES Debug
)
set
(
OBJCOPY_ONLY_KEEP_DEBUG
"--only-keep-debug"
)
endif
()
message
(
STATUS
"Will make separate debug symbols in *.debug"
)
message
(
STATUS
"Will make separate debug symbols in *.debug"
)
add_custom_command
(
TARGET SRB2SDL2 POST_BUILD
add_custom_command
(
TARGET SRB2SDL2 POST_BUILD
COMMAND
${
OBJCOPY
}
--only-keep-debug
$<TARGET_FILE:SRB2SDL2> $<TARGET_FILE:SRB2SDL2>.debug
COMMAND
${
OBJCOPY
}
${
OBJCOPY_ONLY_KEEP_DEBUG
}
$<TARGET_FILE:SRB2SDL2> $<TARGET_FILE:SRB2SDL2>.debug
COMMAND
${
OBJCOPY
}
--strip-debug $<TARGET_FILE:SRB2SDL2>
COMMAND
${
OBJCOPY
}
--strip-debug $<TARGET_FILE:SRB2SDL2>
COMMAND
${
OBJCOPY
}
--add-gnu-debuglink=$<TARGET_FILE
_NAME
:SRB2SDL2>.debug $<TARGET_FILE:SRB2SDL2>
COMMAND
${
OBJCOPY
}
--add-gnu-debuglink=$<TARGET_FILE:SRB2SDL2>.debug $<TARGET_FILE:SRB2SDL2>
)
)
endif
()
endif
()
endif
()
endif
()
...
@@ -290,6 +294,12 @@ if(${SDL2_FOUND})
...
@@ -290,6 +294,12 @@ if(${SDL2_FOUND})
install
(
TARGETS SRB2SDL2 SRB2SDL2
install
(
TARGETS SRB2SDL2 SRB2SDL2
RUNTIME DESTINATION .
RUNTIME DESTINATION .
)
)
if
((
${
CMAKE_BUILD_TYPE
}
MATCHES Debug
)
OR
(
${
CMAKE_BUILD_TYPE
}
MATCHES RelWithDebInfo
))
install
(
FILES $<TARGET_FILE:SRB2SDL2>.debug
DESTINATION .
OPTIONAL
)
endif
()
endif
()
endif
()
if
(
${
CMAKE_SYSTEM
}
MATCHES Windows
)
if
(
${
CMAKE_SYSTEM
}
MATCHES Windows
)
...
...
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