CMake: don't link sdlew when WITH_SDL=OFF

This caused a build error building Blender as a Python module
with !125556 applied.
This commit is contained in:
Campbell Barton
2024-09-06 20:58:17 +10:00
parent bd66008344
commit 11187aa9dc
3 changed files with 14 additions and 13 deletions

View File

@@ -85,8 +85,10 @@ if(WITH_GTESTS)
add_subdirectory(gmock)
endif()
if(WITH_SDL AND WITH_SDL_DYNLOAD)
add_subdirectory(sdlew)
if(WITH_SDL)
if(WITH_SDL_DYNLOAD)
add_subdirectory(sdlew)
endif()
endif()
if(WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)

View File

@@ -28,10 +28,12 @@ if(NOT WITH_SYSTEM_AUDASPACE)
list(APPEND LIB
audaspace
)
if(WITH_SDL_DYNLOAD)
list(APPEND LIB
extern_sdlew
)
if(WITH_SDL)
if(WITH_SDL_DYNLOAD)
list(APPEND LIB
extern_sdlew
)
endif()
endif()
else()
list(APPEND LIB

View File

@@ -262,9 +262,13 @@ if(WITH_SDL)
${SDL_INCLUDE_DIR}
)
if(WITH_SDL_DYNLOAD)
list(APPEND INC
../../../../extern/sdlew/include
)
list(APPEND LIB
extern_sdlew
)
add_definitions(-DWITH_SDL_DYNLOAD)
else()
list(APPEND LIB
${SDL_LIBRARY}
@@ -273,13 +277,6 @@ if(WITH_SDL)
add_definitions(-DWITH_SDL)
endif()
if(WITH_SDL_DYNLOAD)
list(APPEND INC
../../../../extern/sdlew/include
)
add_definitions(-DWITH_SDL_DYNLOAD)
endif()
if(WITH_JACK)
add_definitions(-DWITH_JACK)
endif()