File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ if(BUILD_SDL AND NOT EMSCRIPTEN AND NOT RPI)
12
12
set (SDL_STATIC_PIC ON CACHE BOOL "" FORCE )
13
13
endif ()
14
14
15
- set (SDL_SHARED OFF CACHE BOOL "" FORCE )
16
-
17
15
add_subdirectory (${THIRDPARTY_DIR} /sdl2 )
18
16
19
17
endif ()
@@ -41,7 +39,13 @@ if(BUILD_SDL AND BUILD_PLAYER AND NOT RPI)
41
39
target_link_options (player-sdl PRIVATE -static )
42
40
endif ()
43
41
44
- target_link_libraries (player-sdl PRIVATE tic80core SDL2main SDL2-static )
42
+ target_link_libraries (player-sdl PRIVATE tic80core SDL2main )
43
+
44
+ if (BUILD_STATIC )
45
+ target_link_libraries (player-sdl PRIVATE SDL2-static )
46
+ else ()
47
+ target_link_libraries (player-sdl PRIVATE SDL2 )
48
+ endif ()
45
49
endif ()
46
50
47
51
################################
@@ -113,7 +117,11 @@ if(ANDROID)
113
117
endif ()
114
118
115
119
if (NOT EMSCRIPTEN )
116
- target_link_libraries (sdlgpu SDL2-static )
120
+ if (BUILD_STATIC )
121
+ target_link_libraries (sdlgpu SDL2-static )
122
+ else ()
123
+ target_link_libraries (sdlgpu SDL2 )
124
+ endif ()
117
125
endif ()
118
126
119
127
endif ()
@@ -184,7 +192,11 @@ if(BUILD_SDL)
184
192
elseif (RPI )
185
193
target_link_libraries (tic80 libSDL2.a bcm_host pthread )
186
194
else ()
187
- target_link_libraries (tic80 SDL2-static )
195
+ if (BUILD_STATIC )
196
+ target_link_libraries (tic80 SDL2-static )
197
+ else ()
198
+ target_link_libraries (tic80 SDL2 )
199
+ endif ()
188
200
endif ()
189
201
endif ()
190
202
You can’t perform that action at this time.
0 commit comments