cmake: run updaterev.sh if(NOT CMAKE_HOST_WIN32)

... not if(NOT WINDOWS OR CYGWIN)
This way, it generates SDL_revision.h in cross-build environments too.
This commit is contained in:
Ozkan Sezer 2020-10-13 14:45:10 +03:00
parent 665cfa4981
commit 6756851836

View File

@ -1962,7 +1962,6 @@ endif()
if(NOT HAVE_SDL_JOYSTICK) if(NOT HAVE_SDL_JOYSTICK)
set(SDL_JOYSTICK_DUMMY 1) set(SDL_JOYSTICK_DUMMY 1)
if(SDL_JOYSTICK AND NOT APPLE) # results in unresolved symbols on OSX if(SDL_JOYSTICK AND NOT APPLE) # results in unresolved symbols on OSX
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/dummy/*.c) file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/dummy/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
endif() endif()
@ -2038,10 +2037,11 @@ listtostr(EXTRA_CFLAGS _EXTRA_CFLAGS)
set(EXTRA_CFLAGS ${_EXTRA_CFLAGS}) set(EXTRA_CFLAGS ${_EXTRA_CFLAGS})
# Compat helpers for the configuration files # Compat helpers for the configuration files
if(NOT WINDOWS OR CYGWIN) if(NOT CMAKE_HOST_WIN32)
# TODO: we need a Windows script, too # TODO: we need a Windows script, too
execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh) execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh)
endif()
if(NOT WINDOWS OR CYGWIN)
set(prefix ${CMAKE_INSTALL_PREFIX}) set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}") set(exec_prefix "\${prefix}")
set(libdir "\${exec_prefix}/lib${LIB_SUFFIX}") set(libdir "\${exec_prefix}/lib${LIB_SUFFIX}")