fix windows build on appveyor
This commit is contained in:
parent
8c44d92f9e
commit
6ceb7a8b79
2 changed files with 7 additions and 14 deletions
|
@ -1071,7 +1071,8 @@ if(WIN32 AND MINGW AND ENABLE_STATIC)
|
|||
endif()
|
||||
|
||||
if(APPLE OR WIN32)
|
||||
set_target_properties(stratagus PROPERTIES LINK_FLAGS "${LINK_FLAGS} -lSDL2main")
|
||||
set_target_properties(stratagus PROPERTIES LINK_FLAGS "${LINK_FLAGS} -lSDL2main")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS}")
|
||||
endif()
|
||||
|
||||
########### next target ###############
|
||||
|
@ -1193,14 +1194,9 @@ endif()
|
|||
if(WIN32 AND ENABLE_NSIS AND MAKENSIS_FOUND)
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/COPYING DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/win32/stratagus.ico DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
# also ship lua51.dll
|
||||
find_file(LUA_DLL lua51.dll HINTS ${CMAKE_PREFIX_PATH} PATH_SUFFIXES bin lib)
|
||||
file(COPY ${LUA_DLL} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(MAKENSIS_FLAGS ${MAKENSIS_FLAGS} -DLUADLL=lua51.dll)
|
||||
# ship SDL.dll
|
||||
find_file(SDL_DLL SDL.dll HINTS ${CMAKE_PREFIX_PATH} PATH_SUFFIXES bin lib)
|
||||
file(COPY ${SDL_DLL} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(MAKENSIS_FLAGS ${MAKENSIS_FLAGS} -DSDL=SDL.dll)
|
||||
# ship our DLLs
|
||||
file(GLOB WINDLLS ${CMAKE_PREFIX_PATH}/bin/*.dll)
|
||||
file(COPY ${WINDLLS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_custom_command(OUTPUT Stratagus-${STRATAGUS_VERSION}${MAKENSIS_SUFFIX}
|
||||
COMMAND ${MAKENSIS} ARGS ${MAKENSIS_FLAGS} -DVERSION=${STRATAGUS_VERSION} -DVIVERSION=${STRATAGUS_VERSION_FULL} ${CMAKE_CURRENT_SOURCE_DIR}/src/win32/stratagus.nsi
|
||||
DEPENDS src/win32/stratagus.nsi stratagus COPYING
|
||||
|
|
|
@ -215,8 +215,7 @@ Section "${NAME}"
|
|||
|
||||
SetOutPath $INSTDIR
|
||||
File "${EXE}"
|
||||
File "${SDL}"
|
||||
File "${LUADLL}"
|
||||
File *.dll
|
||||
WriteRegStr HKLM "${REGKEY}" "DisplayName" "${NAME}"
|
||||
WriteRegStr HKLM "${REGKEY}" "UninstallString" "$\"$INSTDIR\${UNINSTALL}$\""
|
||||
WriteRegStr HKLM "${REGKEY}" "QuietUninstallString" "$\"$INSTDIR\${UNINSTALL}$\" /S"
|
||||
|
@ -239,9 +238,7 @@ Section "un.${NAME}" Executable
|
|||
SectionIn RO
|
||||
|
||||
Delete "$INSTDIR\${EXE}"
|
||||
Delete "$INSTDIR\${SDL}"
|
||||
IfFileExists "$INSTDIR\libfluidsynth.dll" 0 +2
|
||||
Delete "$INSTDIR\libfluidsynth.dll"
|
||||
Delete "$INSTDIR\*.dll"
|
||||
Delete "$INSTDIR\${UNINSTALL}"
|
||||
RMDir "$INSTDIR"
|
||||
DeleteRegKey /ifempty HKLM "${REGKEY}"
|
||||
|
|
Loading…
Reference in a new issue