Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
S
sdl2-demo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Martin Kozub
sdl2-demo
Commits
71e90145
Commit
71e90145
authored
Aug 16, 2019
by
Martin Kozub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ading patch to build SDL2pp statically
parent
1d64e194
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
ext/CMakeLists.txt
ext/CMakeLists.txt
+1
-1
ext/patches/sdl2pp-make-lib-static.patch
ext/patches/sdl2pp-make-lib-static.patch
+8
-8
No files found.
ext/CMakeLists.txt
View file @
71e90145
...
@@ -388,7 +388,7 @@ ExternalProject_Add(SDL2pp_build
...
@@ -388,7 +388,7 @@ ExternalProject_Add(SDL2pp_build
URL
${
SDL2pp_SRC
}
URL
${
SDL2pp_SRC
}
# patch #1: SDL2pp currently builds only shared library in standalone mode but we want static
# patch #1: SDL2pp currently builds only shared library in standalone mode but we want static
# patch #2: fix include paths when SDL_image is installed into a directory other than where SDL itself is installed
# patch #2: fix include paths when SDL_image is installed into a directory other than where SDL itself is installed
# PATCH_COMMAND patch -p1 < "${CMAKE_CURRENT_SOURCE_DIR}/patches/sdl2pp
.patch"
PATCH_COMMAND patch -p1 <
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/patches/sdl2pp-make-lib-static
.patch"
# due to the way cmake handles ';' in strings (lists), use ':' and let ExternalProject
# due to the way cmake handles ';' in strings (lists), use ':' and let ExternalProject
# replace these by ';'
# replace these by ';'
LIST_SEPARATOR
":"
LIST_SEPARATOR
":"
...
...
ext/patches/sdl2pp-make-lib-static.patch
View file @
71e90145
diff --git a/CMakeLists.txt b/CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index
f539296..b554caa
100644
index
c831586..acb4143
100644
--- a/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -209,7 +209,7 @@
INCLUDE(GenerateExportHeader)
@@ -204,7 +204,7 @@
IF(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
OPTION(SDL2PP_WITH_EXAMPLES "Build examples" ON)
OPTION(SDL2PP_WITH_TESTS "Build tests" ON)
OPTION(SDL2PP_ENABLE_LIVE_TESTS "Enable live tests (require X11 display and audio device)" ON)
- OPTION(SDL2PP_STATIC "Build static library instead of shared one" OFF)
+ OPTION(SDL2PP_STATIC "Build static library instead of shared one" ON)
IF(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# library
# library
- ADD_LIBRARY(SDL2pp SHARED ${LIBRARY_SOURCES} ${LIBRARY_HEADERS})
IF(SDL2PP_STATIC)
+ ADD_LIBRARY(SDL2pp STATIC ${LIBRARY_SOURCES} ${LIBRARY_HEADERS})
GENERATE_EXPORT_HEADER(SDL2pp EXPORT_FILE_NAME SDL2pp/Export.hh)
TARGET_LINK_LIBRARIES(SDL2pp ${SDL2_ALL_LIBRARIES})
SET_TARGET_PROPERTIES(SDL2pp PROPERTIES VERSION 8.0.0 SOVERSION 8)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment