mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-25 22:57:15 +00:00
[Library] Update zlibng (#1255)
* Update zlibng * Set cmake path more directly in zlibng to hopefully fix an issue with the build on drone * I'm dumb, missing / in path * Mackal helps with a dumb gitignore issue * Adding all the files, not sure what's ignoring them and im tired of looking * Some tweaks to zlibng build to hopefully get it to build properly. works on msvc now
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
if(NOT DEFINED OUTPUT OR NOT DEFINED COMPARE OR NOT DEFINED COMMAND)
|
||||
message(FATAL_ERROR "Run and compare arguments missing")
|
||||
endif()
|
||||
|
||||
if(INPUT)
|
||||
# Run command with stdin input and redirect stdout to output
|
||||
execute_process(COMMAND ${CMAKE_COMMAND}
|
||||
"-DCOMMAND=${COMMAND}"
|
||||
-DINPUT=${INPUT}
|
||||
-DOUTPUT=${OUTPUT}
|
||||
"-DSUCCESS_EXIT=${SUCCESS_EXIT}"
|
||||
-P ${CMAKE_CURRENT_LIST_DIR}/run-and-redirect.cmake
|
||||
RESULT_VARIABLE CMD_RESULT)
|
||||
else()
|
||||
# Run command and redirect stdout to output
|
||||
execute_process(COMMAND ${CMAKE_COMMAND}
|
||||
"-DCOMMAND=${COMMAND}"
|
||||
-DOUTPUT=${OUTPUT}
|
||||
"-DSUCCESS_EXIT=${SUCCESS_EXIT}"
|
||||
-P ${CMAKE_CURRENT_LIST_DIR}/run-and-redirect.cmake
|
||||
RESULT_VARIABLE CMD_RESULT)
|
||||
endif()
|
||||
|
||||
if(CMD_RESULT)
|
||||
message(FATAL_ERROR "Run before compare failed: ${CMD_RESULT}")
|
||||
endif()
|
||||
|
||||
# Use configure_file to normalize line-endings
|
||||
if(IGNORE_LINE_ENDINGS)
|
||||
configure_file(${COMPARE} ${COMPARE}.cmp NEWLINE_STYLE LF)
|
||||
set(COMPARE ${COMPARE}.cmp)
|
||||
configure_file(${OUTPUT} ${OUTPUT}.cmp NEWLINE_STYLE LF)
|
||||
set(OUTPUT ${OUTPUT}.cmp)
|
||||
endif()
|
||||
|
||||
# Compare that output is equal to specified file
|
||||
execute_process(COMMAND ${CMAKE_COMMAND}
|
||||
-E compare_files ${COMPARE} ${OUTPUT}
|
||||
RESULT_VARIABLE CMD_RESULT)
|
||||
|
||||
# Delete temporary files used to normalize line-endings
|
||||
if(IGNORE_LINE_ENDINGS)
|
||||
file(REMOVE ${COMPARE} ${OUTPUT})
|
||||
endif()
|
||||
|
||||
if(CMD_RESULT)
|
||||
message(FATAL_ERROR "Run compare failed: ${CMD_RESULT}")
|
||||
endif()
|
||||
Reference in New Issue
Block a user