mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-20 19:45:22 +02:00
CMake stuff works now on linux and windows... and should be possible to make to work on OS X.
This commit is contained in:
16
cmake/Modules/misc.cmake
Normal file
16
cmake/Modules/misc.cmake
Normal file
@@ -0,0 +1,16 @@
|
||||
MACRO (GETDATETIME RESULT)
|
||||
IF (WIN32)
|
||||
EXECUTE_PROCESS(COMMAND "cmd" /C echo %date% %time% OUTPUT_VARIABLE ${RESULT})
|
||||
string(REGEX REPLACE "\n" "" ${RESULT} "${${RESULT}}")
|
||||
ELSEIF(UNIX)
|
||||
EXECUTE_PROCESS(COMMAND "date" "+%Y-%m-%d_%H:%M:%S" OUTPUT_VARIABLE ${RESULT})
|
||||
string(REGEX REPLACE "\n" "" ${RESULT} "${${RESULT}}")
|
||||
ELSE (WIN32)
|
||||
MESSAGE(SEND_ERROR "date not implemented")
|
||||
SET(${RESULT} "Unknown")
|
||||
ENDIF (WIN32)
|
||||
|
||||
string(REGEX REPLACE " " "_" ${RESULT} "${${RESULT}}")
|
||||
|
||||
ENDMACRO (GETDATETIME)
|
||||
|
Reference in New Issue
Block a user