mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00: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:
parent
426c206d7e
commit
9fbb0889a7
9 changed files with 367 additions and 102 deletions
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)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue