Skip to content

Commit

Permalink
cmake: run updaterev.sh if(NOT CMAKE_HOST_WIN32)
Browse files Browse the repository at this point in the history
... not if(NOT WINDOWS OR CYGWIN)
This way, it generates SDL_revision.h in cross-build environments too.
  • Loading branch information
sezero committed Oct 13, 2020
1 parent 665cfa4 commit 6756851
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Expand Up @@ -1962,7 +1962,6 @@ endif()
if(NOT HAVE_SDL_JOYSTICK)
set(SDL_JOYSTICK_DUMMY 1)
if(SDL_JOYSTICK AND NOT APPLE) # results in unresolved symbols on OSX

file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/dummy/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
endif()
Expand Down Expand Up @@ -2038,10 +2037,11 @@ listtostr(EXTRA_CFLAGS _EXTRA_CFLAGS)
set(EXTRA_CFLAGS ${_EXTRA_CFLAGS})

# Compat helpers for the configuration files
if(NOT WINDOWS OR CYGWIN)
if(NOT CMAKE_HOST_WIN32)
# TODO: we need a Windows script, too
execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh)

endif()
if(NOT WINDOWS OR CYGWIN)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")
set(libdir "\${exec_prefix}/lib${LIB_SUFFIX}")
Expand Down

0 comments on commit 6756851

Please sign in to comment.