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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
SteelT
SRB2
Commits
a851c5d7
Commit
a851c5d7
authored
6 years ago
by
Marco Z
Browse files
Options
Downloads
Patches
Plain Diff
Add libopenmpt to cmake
parent
08812b15
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/CMakeLists.txt
+23
-1
23 additions, 1 deletion
src/CMakeLists.txt
src/sdl/CMakeLists.txt
+6
-0
6 additions, 0 deletions
src/sdl/CMakeLists.txt
with
29 additions
and
1 deletion
src/CMakeLists.txt
+
23
−
1
View file @
a851c5d7
...
...
@@ -218,6 +218,8 @@ set(SRB2_CONFIG_HAVE_ZLIB ON CACHE BOOL
"Enable zlib support."
)
set
(
SRB2_CONFIG_HAVE_GME ON CACHE BOOL
"Enable GME support."
)
set
(
SRB2_CONFIG_HAVE_OPENMPT OFF CACHE BOOL
"Enable OpenMPT support."
)
set
(
SRB2_CONFIG_HWRENDER ON CACHE BOOL
"Enable hardware rendering through OpenGL."
)
set
(
SRB2_CONFIG_USEASM OFF CACHE BOOL
...
...
@@ -230,7 +232,7 @@ set(SRB2_CONFIG_STATIC_OPENGL OFF CACHE BOOL
### use internal libraries?
if
(
${
CMAKE_SYSTEM
}
MATCHES
"Windows"
)
###set on Windows only
set
(
SRB2_CONFIG_USE_INTERNAL_LIBRARIES OFF CACHE BOOL
"Use SRB2's internal copies of required dependencies (SDL2, PNG, zlib, GME)."
)
"Use SRB2's internal copies of required dependencies (SDL2, PNG, zlib, GME
, OpenMPT
)."
)
endif
()
if
(
${
SRB2_CONFIG_HAVE_BLUA
}
)
...
...
@@ -340,6 +342,26 @@ if(${SRB2_CONFIG_HAVE_GME})
endif
()
endif
()
if
(
${
SRB2_CONFIG_HAVE_OPENMPT
}
)
if
(
${
SRB2_CONFIG_USE_INTERNAL_LIBRARIES
}
)
set
(
OPENMPT_FOUND ON
)
set
(
OPENMPT_INCLUDE_DIRS
${
CMAKE_SOURCE_DIR
}
/libs/libopenmpt/inc/libopenmpt
)
if
(
${
SRB2_SYSTEM_BITS
}
EQUAL 64
)
set
(
OPENMPT_LIBRARIES
"-L
${
CMAKE_SOURCE_DIR
}
/libs/libopenmpt/lib/x86 -llibopenmpt"
)
else
()
# 32-bit
set
(
OPENMPT_LIBRARIES
"-L
${
CMAKE_SOURCE_DIR
}
/libs/libopenmpt/lib/x86_64 -llibopenmpt"
)
endif
()
else
()
find_package
(
OPENMPT
)
endif
()
if
(
${
OPENMPT_FOUND
}
)
set
(
SRB2_HAVE_OPENMPT ON
)
add_definitions
(
-DHAVE_OPENMPT
)
else
()
message
(
WARNING
"You have specified that OpenMPT is available but it was not found."
)
endif
()
endif
()
if
(
${
SRB2_CONFIG_HAVE_ZLIB
}
)
if
(
${
SRB2_CONFIG_USE_INTERNAL_LIBRARIES
}
)
set
(
ZLIB_FOUND ON
)
...
...
This diff is collapsed.
Click to expand it.
src/sdl/CMakeLists.txt
+
6
−
0
View file @
a851c5d7
...
...
@@ -146,6 +146,7 @@ if(${SDL2_FOUND})
SDL2
SDL2_mixer
${
GME_LIBRARIES
}
${
OPENMPT_LIBRARIES
}
${
PNG_LIBRARIES
}
${
ZLIB_LIBRARIES
}
${
OPENGL_LIBRARIES
}
...
...
@@ -156,6 +157,7 @@ if(${SDL2_FOUND})
${
SDL2_LIBRARIES
}
${
SDL2_MIXER_LIBRARIES
}
${
GME_LIBRARIES
}
${
OPENMPT_LIBRARIES
}
${
PNG_LIBRARIES
}
${
ZLIB_LIBRARIES
}
${
OPENGL_LIBRARIES
}
...
...
@@ -235,6 +237,7 @@ if(${SDL2_FOUND})
${
SDL2_INCLUDE_DIRS
}
${
SDL2_MIXER_INCLUDE_DIRS
}
${
GME_INCLUDE_DIRS
}
${
OPENMPT_INCLUDE_DIRS
}
${
PNG_INCLUDE_DIRS
}
${
ZLIB_INCLUDE_DIRS
}
${
OPENGL_INCLUDE_DIRS
}
...
...
@@ -321,6 +324,9 @@ if(${SDL2_FOUND})
if
(
${
SRB2_CONFIG_HAVE_GME
}
)
getwinlib
(
libgme
"libgme.dll"
)
endif
()
if
(
${
SRB2_CONFIG_HAVE_OPENMPT
}
)
getwinlib
(
libopenmpt
"libopenmpt.dll"
)
endif
()
install
(
PROGRAMS
${
win_extra_dll_list
}
...
...
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