mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-26 19:47:16 +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,38 @@
|
||||
# If no output is specified, discard output
|
||||
if(NOT DEFINED OUTPUT)
|
||||
if(WIN32)
|
||||
set(OUTPUT NUL)
|
||||
else()
|
||||
set(OUTPUT /dev/null)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(INPUT)
|
||||
# Check to see that input file exists
|
||||
if(NOT EXISTS ${INPUT})
|
||||
message(FATAL_ERROR "Cannot find input: ${INPUT}")
|
||||
endif()
|
||||
# Execute with both stdin and stdout file
|
||||
execute_process(COMMAND ${COMMAND}
|
||||
RESULT_VARIABLE CMD_RESULT
|
||||
INPUT_FILE ${INPUT}
|
||||
OUTPUT_FILE ${OUTPUT})
|
||||
else()
|
||||
# Execute with only stdout file
|
||||
execute_process(COMMAND ${COMMAND}
|
||||
RESULT_VARIABLE CMD_RESULT
|
||||
OUTPUT_FILE ${OUTPUT})
|
||||
endif()
|
||||
|
||||
# Check if exit code is in list of successful exit codes
|
||||
if(SUCCESS_EXIT)
|
||||
list(FIND SUCCESS_EXIT ${CMD_RESULT} _INDEX)
|
||||
if (${_INDEX} GREATER -1)
|
||||
set(CMD_RESULT 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check to see if successful
|
||||
if(CMD_RESULT)
|
||||
message(FATAL_ERROR "${COMMAND} failed: ${CMD_RESULT}")
|
||||
endif()
|
||||
Reference in New Issue
Block a user