Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Kart-Public
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JugadorXEI
Kart-Public
Commits
53799eb3
Commit
53799eb3
authored
10 years ago
by
Eidolon
Browse files
Options
Downloads
Patches
Plain Diff
cmake: Add CPack Package Generation
Generates zips only at the moment
parent
1c9de50a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+23
-2
23 additions, 2 deletions
CMakeLists.txt
assets/CMakeLists.txt
+29
-0
29 additions, 0 deletions
assets/CMakeLists.txt
src/sdl/CMakeLists.txt
+34
-9
34 additions, 9 deletions
src/sdl/CMakeLists.txt
src/win32/CMakeLists.txt
+0
-2
0 additions, 2 deletions
src/win32/CMakeLists.txt
with
86 additions
and
13 deletions
CMakeLists.txt
+
23
−
2
View file @
53799eb3
...
...
@@ -65,6 +65,27 @@ if(${CMAKE_SYSTEM} MATCHES "Darwin")
endif
()
endif
()
# TODO support MacOSX builds
# Set EXE names so the assets CMakeLists can refer to its target
set
(
SRB2_SDL2_EXE_NAME srb2
)
set
(
SRB2_WIN_EXE_NAME srb2dd
)
add_subdirectory
(
src/
)
add_subdirectory
(
src
)
add_subdirectory
(
assets
)
##### PACKAGE CONFIGURATION #####
if
(
${
CMAKE_SYSTEM
}
MATCHES
"Windows"
)
set
(
CPACK_GENERATOR
"ZIP"
)
endif
()
set
(
CPACK_PACKAGE_DESCRIPTION_SUMMARY
"Sonic Robo Blast 2"
)
set
(
CPACK_PACKAGE_VENDOR
"Sonic Team Jr."
)
#set(CPACK_PACKAGE_DESCRIPTION_FILE )
set
(
CPACK_RESOURCE_FILE_LICENSE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/LICENSE"
)
set
(
CPACK_PACKAGE_VERSION_MAJOR
${
SRB2_VERSION_MAJOR
}
)
set
(
CPACK_PACKAGE_VERSION_MINOR
${
SRB2_VERSION_MINOR
}
)
set
(
CPACK_PACKAGE_VERSION_PATCH
${
SRB2_VERSION_PATCH
}
)
set
(
CPACK_PACKAGE_INSTALL_DIRECTORY
"CMake
${
CMAKE_VERSION_MAJOR
}
.
${
CMAKE_VERSION_MINOR
}
"
)
include
(
CPack
)
This diff is collapsed.
Click to expand it.
assets/CMakeLists.txt
0 → 100644
+
29
−
0
View file @
53799eb3
## Assets Target Configuration ##
# MD5 generation
set
(
SRB2_ASSET_ALL
${
CMAKE_CURRENT_SOURCE_DIR
}
/srb2.srb
${
CMAKE_CURRENT_SOURCE_DIR
}
/player.dta
${
CMAKE_CURRENT_SOURCE_DIR
}
/rings.dta
${
CMAKE_CURRENT_SOURCE_DIR
}
/zones.dta
${
CMAKE_CURRENT_SOURCE_DIR
}
/patch.dta
${
CMAKE_CURRENT_SOURCE_DIR
}
/music.dta
)
set
(
SRB2_ASSET_HASHED
${
CMAKE_CURRENT_SOURCE_DIR
}
/srb2.srb
${
CMAKE_CURRENT_SOURCE_DIR
}
/player.dta
${
CMAKE_CURRENT_SOURCE_DIR
}
/rings.dta
${
CMAKE_CURRENT_SOURCE_DIR
}
/zones.dta
${
CMAKE_CURRENT_SOURCE_DIR
}
/patch.dta
)
foreach
(
SRB2_ASSET
${
SRB2_ASSET_HASHED
}
)
file
(
MD5
${
SRB2_ASSET
}
"SRB2_ASSET_
${
SRB2_ASSET
}
_HASH"
)
endforeach
()
# Installation
install
(
FILES
${
SRB2_ASSET_ALL
}
DESTINATION .
)
This diff is collapsed.
Click to expand it.
src/sdl/CMakeLists.txt
+
34
−
9
View file @
53799eb3
...
...
@@ -42,15 +42,6 @@ set(SRB2_SDL2_HEADERS
prepend_sources
(
SRB2_SDL2_SOURCES
)
prepend_sources
(
SRB2_SDL2_HEADERS
)
# Binary name
set
(
SRB2_SDL2_EXE_NAME srb2sdl2
)
if
(
${
CMAKE_SYSTEM
}
MATCHES
"Windows"
)
set
(
SRB2_SDL2_EXE_NAME srb2win
)
endif
()
if
(
CLANG
)
set
(
SRB2_SDL2_EXE_NAME SRB2
)
endif
()
# Dependency
find_package
(
SDL2
)
...
...
@@ -160,6 +151,40 @@ if(${SDL2_FOUND})
-DHAVE_SDL
-DNDEBUG
)
#### Installation ####
install
(
TARGETS
${
SRB2_SDL2_EXE_NAME
}
${
SRB2_SDL2_EXE_NAME
}
RUNTIME DESTINATION .
)
if
(
${
CMAKE_SYSTEM
}
MATCHES Windows
)
find_library
(
SRB2_SDL2_DLL_SDL2
"SDL2.dll"
)
if
(
${
SRB2_CONFIG_SDL2_USEMIXER
}
)
find_library
(
SRB2_SDL2_DLL_SDL2_mixer
"SDL2_mixer.dll"
)
find_library
(
SRB2_SDL2_DLL_libmikmod-2
"libmikmod-2.dll"
)
find_library
(
SRB2_SDL2_DLL_libogg_0
"libogg-0.dll"
)
find_library
(
SRB2_SDL2_DLL_libvorbis_0
"libvorbis-0.dll"
)
find_library
(
SRB2_SDL2_DLL_libvorbisfile_3
"libvorbisfile-3.dll"
)
find_library
(
SRB2_SDL2_DLL_smpeg2
"smpeg2.dll"
)
endif
()
if
(
${
SRB2_CONFIG_HAVE_GME
}
)
find_library
(
SRB2_SDL2_DLL_libgme
"libgme.dll"
)
endif
()
install
(
PROGRAMS
${
SRB2_SDL2_DLL_SDL2
}
${
SRB2_SDL2_DLL_SDL2_mixer
}
${
SRB2_SDL2_DLL_libmikmod
}
${
SRB2_SDL2_DLL_libogg_0
}
${
SRB2_SDL2_DLL_libvorbis_0
}
${
SRB2_SDL2_DLL_libvorbisfile_3
}
${
SRB2_SDL2_DLL_smpeg2
}
${
SRB2_SDL2_DLL_libgme
}
DESTINATION .
)
endif
()
else
()
message
(
WARNING
"SDL2 wasn't found, so
${
SRB2_SDL2_EXE_NAME
}
won't be available"
)
endif
()
This diff is collapsed.
Click to expand it.
src/win32/CMakeLists.txt
+
0
−
2
View file @
53799eb3
set
(
SRB2_WIN_EXE_NAME srb2dd
)
add_executable
(
${
SRB2_WIN_EXE_NAME
}
EXCLUDE_FROM_ALL
${
SRB2_CORE_SOURCES
}
${
SRB2_CORE_HEADERS
}
...
...
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