forked from pool/allegro44
31 lines
761 B
Diff
31 lines
761 B
Diff
Index: CMakeLists.txt
|
|
===================================================================
|
|
--- CMakeLists.txt.orig
|
|
+++ CMakeLists.txt
|
|
@@ -22,6 +22,8 @@
|
|
# CMake setup
|
|
#
|
|
|
|
+INCLUDE(CMakePushCheckState)
|
|
+
|
|
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
|
if(COMMAND cmake_policy)
|
|
cmake_policy(SET CMP0003 NEW)
|
|
@@ -198,6 +200,8 @@ if(UNIX)
|
|
ALLEGRO_USE_CONSTRUCTOR)
|
|
|
|
find_library(RT_LIBRARY rt)
|
|
+ cmake_push_check_state()
|
|
+ set(CMAKE_REQUIRED_LIBRARIES ${RT_LIBRARY})
|
|
check_c_source_compiles("
|
|
#include <time.h>
|
|
int main(void) {
|
|
@@ -207,6 +211,7 @@ if(UNIX)
|
|
}"
|
|
ALLEGRO_HAVE_POSIX_MONOTONIC_CLOCK
|
|
)
|
|
+ cmake_pop_check_state()
|
|
|
|
if(MAGIC_MAIN)
|
|
set(ALLEGRO_WITH_MAGIC_MAIN 1)
|