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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vlad Doc
SRB2
Commits
9e8768e3
Commit
9e8768e3
authored
9 years ago
by
Yukita Mayako
Browse files
Options
Downloads
Patches
Plain Diff
Added ENet library to SDL2 CMake.
parent
cff9289b
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmake/Modules/FindENet.cmake
+34
-0
34 additions, 0 deletions
cmake/Modules/FindENet.cmake
src/CMakeLists.txt
+2
-0
2 additions, 0 deletions
src/CMakeLists.txt
src/sdl/CMakeLists.txt
+3
-0
3 additions, 0 deletions
src/sdl/CMakeLists.txt
with
39 additions
and
0 deletions
cmake/Modules/FindENet.cmake
0 → 100644
+
34
−
0
View file @
9e8768e3
# Find ENet
# Once done, this will define
#
# ENET_FOUND - system has SDL2
# ENET_INCLUDE_DIRS - SDL2 include directories
# ENET_LIBRARIES - link libraries
include
(
LibFindMacros
)
libfind_pkg_check_modules
(
ENET_PKGCONF ENET
)
# includes
find_path
(
ENET_INCLUDE_DIR
NAMES enet.h
PATHS
${
ENET_PKGCONF_INCLUDE_DIRS
}
"/usr/include/enet"
"/usr/local/include/enet"
)
# library
find_library
(
ENET_LIBRARY
NAMES libenet
PATHS
${
ENET_PKGCONF_LIBRARY_DIRS
}
"/usr/lib"
"/usr/local/lib"
)
# set include dir variables
set
(
ENET_PROCESS_INCLUDES ENET_INCLUDE_DIR
)
set
(
ENET_PROCESS_LIBS ENET_LIBRARY
)
libfind_process
(
ENET
)
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
2
−
0
View file @
9e8768e3
...
...
@@ -404,6 +404,8 @@ else()
add_definitions
(
-DNOASM -DNONX86
)
endif
()
find_package
(
ENet
)
# Targets
# Compatibility flag with later versions of GCC
...
...
This diff is collapsed.
Click to expand it.
src/sdl/CMakeLists.txt
+
3
−
0
View file @
9e8768e3
...
...
@@ -125,6 +125,7 @@ if(${SDL2_FOUND})
${
PNG_LIBRARIES
}
${
ZLIB_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
ENET_LIBRARIES
}
)
set_target_properties
(
SRB2SDL2 PROPERTIES OUTPUT_NAME
"Sonic Robo Blast 2"
)
else
()
...
...
@@ -134,6 +135,7 @@ if(${SDL2_FOUND})
${
PNG_LIBRARIES
}
${
ZLIB_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
ENET_LIBRARIES
}
)
if
(
${
CMAKE_SYSTEM
}
MATCHES Linux
)
...
...
@@ -201,6 +203,7 @@ if(${SDL2_FOUND})
${
PNG_INCLUDE_DIRS
}
${
ZLIB_INCLUDE_DIRS
}
${
OPENGL_INCLUDE_DIRS
}
${
ENET_INCLUDE_DIRS
}
)
if
(
${
SRB2_HAVE_MIXER
}
)
...
...
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