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
John Peter Sa
SRB2
Commits
f77cde0a
Commit
f77cde0a
authored
4 months ago
by
Logan Aerl Arias
Browse files
Options
Downloads
Patches
Plain Diff
mingw workaround, -static doesn't work
mingw workaround, -static doesn't work, copy the needed dlls
parent
5c136b1c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/CMakeLists.txt
+6
-2
6 additions, 2 deletions
src/CMakeLists.txt
with
6 additions
and
2 deletions
src/CMakeLists.txt
+
6
−
2
View file @
f77cde0a
...
@@ -132,11 +132,15 @@ add_custom_target(_SRB2_reconf ALL
...
@@ -132,11 +132,15 @@ add_custom_target(_SRB2_reconf ALL
)
)
add_dependencies
(
SRB2SDL2 _SRB2_reconf
)
add_dependencies
(
SRB2SDL2 _SRB2_reconf
)
if
(
"
${
CMAKE_COMPILER_I
S_GNUCC
}
"
AND
"
${
CMAKE_SYSTEM_NAME
}
"
MATCHES
"Windows"
)
if
(
"
${
CMAKE_
C_
COMPILER_I
D
}
"
MATCHES
"GNU
"
AND
"
${
CMAKE_SYSTEM_NAME
}
"
MATCHES
"Windows"
)
target_link_options
(
SRB2SDL2 PRIVATE
"-Wl,--disable-dynamicbase"
)
target_link_options
(
SRB2SDL2 PRIVATE
"-Wl,--disable-dynamicbase"
)
if
(
"
${
SRB2_CONFIG_STATIC_STDLIB
}
"
)
if
(
"
${
SRB2_CONFIG_STATIC_STDLIB
}
"
)
# On MinGW with internal libraries, link the standard library statically
# On MinGW with internal libraries, link the standard library statically
MESSAGE
(
STATUS
"Forcing static libstdc++ on MinGW?"
)
target_link_options
(
SRB2SDL2 PRIVATE
"-static"
)
target_link_options
(
SRB2SDL2 PRIVATE
"-static"
)
set
(
THREADS_PREFER_PTHREAD_FLAG TRUE
)
find_package
(
Threads REQUIRED
)
target_link_libraries
(
SRB2SDL2 PRIVATE Threads::Threads
)
endif
()
endif
()
if
(
CMAKE_SIZEOF_VOID_P EQUAL 4
)
if
(
CMAKE_SIZEOF_VOID_P EQUAL 4
)
target_link_options
(
SRB2SDL2 PRIVATE
"-Wl,--large-address-aware"
)
target_link_options
(
SRB2SDL2 PRIVATE
"-Wl,--large-address-aware"
)
...
@@ -492,7 +496,7 @@ if((CMAKE_COMPILER_IS_GNUCC) AND NOT ("${CMAKE_SYSTEM_NAME}" MATCHES Darwin))
...
@@ -492,7 +496,7 @@ if((CMAKE_COMPILER_IS_GNUCC) AND NOT ("${CMAKE_SYSTEM_NAME}" MATCHES Darwin))
endif
()
endif
()
# copy DLLs to bin/ directory if building internal shared on windows
# copy DLLs to bin/ directory if building internal shared on windows
if
(
"
${
CMAKE_SYSTEM_NAME
}
"
STREQUAL Windows AND NOT
"
${
SRB2_CONFIG_INTERNAL_LIBRARIES
}
"
AND
"
${
SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES
}
"
)
if
(
"
${
CMAKE_SYSTEM_NAME
}
"
STREQUAL Windows AND NOT
"
${
SRB2_CONFIG_INTERNAL_LIBRARIES
}
"
)
set
(
ADDITIONAL_DLLS
""
)
set
(
ADDITIONAL_DLLS
""
)
if
(
"
${
CMAKE_C_COMPILER_ID
}
"
STREQUAL GNU
)
if
(
"
${
CMAKE_C_COMPILER_ID
}
"
STREQUAL GNU
)
# also copy implicitly linked system libraries
# also copy implicitly linked system libraries
...
...
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