diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-03-24 00:03:37 +0100 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-03-24 12:00:12 +0100 |
commit | 195d6cded05f7ef5bde695ee047b341a0265eab3 (patch) | |
tree | af6ffa3622ae9bf7f2f5f065e269e86a019af854 /cmake | |
parent | c211b001d2a4c9b36034a812650f1a2ac693ee54 (diff) | |
download | colobot-195d6cded05f7ef5bde695ee047b341a0265eab3.tar.gz colobot-195d6cded05f7ef5bde695ee047b341a0265eab3.tar.bz2 colobot-195d6cded05f7ef5bde695ee047b341a0265eab3.zip |
Fixed timer functions on win32
* changed win32 implementation to QueryPerformaceTimer system function
* refactored system utils code
* proper tests for time utils and update event creation in application
* should fix issue #134
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/msys.cmake | 12 | ||||
-rw-r--r-- | cmake/mxe.cmake | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/cmake/msys.cmake b/cmake/msys.cmake new file mode 100644 index 0000000..26b25b2 --- /dev/null +++ b/cmake/msys.cmake @@ -0,0 +1,12 @@ +# Hacks for MSYS +if (MSYS AND (NOT MXE)) + message(STATUS "Detected MSYS build") + + set(PLATFORM_WINDOWS 1) + set(PLATFORM_LINUX 0) + set(PLATFORM_OTHER 0) + + set(COLOBOT_CXX_FLAGS "${COLOBOT_CXX_FLAGS} -U__STRICT_ANSI__") # fixes putenv() + set(USE_SDL_MAIN 1) # fixes SDL_main + set(DESKTOP OFF) # MSYS doesn't have the necessary tools +endif() diff --git a/cmake/mxe.cmake b/cmake/mxe.cmake index 5502c1b..9bb38d0 100644 --- a/cmake/mxe.cmake +++ b/cmake/mxe.cmake @@ -4,6 +4,9 @@ if((${CMAKE_CROSSCOMPILING}) AND (DEFINED MSYS)) message(STATUS "Detected MXE build") set(MXE 1) + set(PLATFORM_WINDOWS 1) + set(PLATFORM_LINUX 0) + set(PLATFORM_OTHER 0) # Because some tests will not compile set(TESTS OFF) # All must be static, CBOT and GLEW too |