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
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
864baeda
Commit
864baeda
authored
9 years ago
by
Alam Ed Arias
Browse files
Options
Downloads
Patches
Plain Diff
cmake: fixed up to handle Clang and AppleClang
parent
4d5f1633
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!41
Travis-CI builds
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/CMakeLists.txt
+3
-3
3 additions, 3 deletions
src/CMakeLists.txt
src/sdl/CMakeLists.txt
+4
-4
4 additions, 4 deletions
src/sdl/CMakeLists.txt
with
7 additions
and
7 deletions
src/CMakeLists.txt
+
3
−
3
View file @
864baeda
...
...
@@ -166,7 +166,7 @@ set(SRB2_CORE_GAME_SOURCES
p_tick.h
)
if
(
NOT
CLANG
)
if
(
NOT
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
)
set
(
SRB2_CORE_SOURCES
${
SRB2_CORE_SOURCES
}
string.c
)
endif
()
...
...
@@ -404,7 +404,7 @@ endif()
# Compatibility flag with later versions of GCC
# We should really fix our code to not need this
if
(
NOT CLANG AND NOT MSVC
)
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"GNU"
)
set
(
CMAKE_C_FLAGS
${
CMAKE_C_FLAGS
}
-mno-ms-bitfields
)
endif
()
...
...
@@ -429,4 +429,4 @@ endif()
if
(
NOT
${
SRB2_SDL2_AVAILABLE
}
AND NOT
${
SRB2_WIN32_AVAILABLE
}
)
message
(
FATAL_ERROR
"There are no targets available to build an SRB2 executable. :("
)
endif
()
\ No newline at end of file
endif
()
This diff is collapsed.
Click to expand it.
src/sdl/CMakeLists.txt
+
4
−
4
View file @
864baeda
...
...
@@ -117,7 +117,7 @@ if(${SDL2_FOUND})
add_executable
(
SRB2SDL2 MACOSX_BUNDLE WIN32
${
SRB2_SDL2_TOTAL_SOURCES
}
)
set_target_properties
(
SRB2SDL2 PROPERTIES OUTPUT_NAME
${
SRB2_SDL2_EXE_NAME
}
)
if
(
CLANG
)
if
(
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
)
add_framework
(
CoreFoundation SRB2SDL2
)
add_framework
(
SDL2 SRB2SDL2
)
add_framework
(
SDL2_mixer SRB2SDL2
)
...
...
@@ -224,7 +224,7 @@ if(${SDL2_FOUND})
endif
()
#### Installation ####
if
(
C
LANG
)
if
(
C
MAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
install
(
TARGETS SRB2SDL2
BUNDLE DESTINATION .
)
...
...
@@ -265,7 +265,7 @@ if(${SDL2_FOUND})
# Mac bundle fixup
if
(
C
LANG
)
if
(
C
MAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
install
(
CODE
"
include(BundleUtilities)
fixup_bundle(
\"
${
CMAKE_INSTALL_PREFIX
}
/Sonic Robo Blast 2.app
\"
...
...
@@ -279,4 +279,4 @@ if(${SDL2_FOUND})
else
()
message
(
WARNING
"SDL2 was not found, so the SDL2 target will not be available."
)
set
(
SRB2_SDL2_AVAILABLE NO PARENT_SCOPE
)
endif
()
\ No newline at end of file
endif
()
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