summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmcurl/CMakeLists.txt')
-rw-r--r--Utilities/cmcurl/CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 09a575f..573ac85 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -35,7 +35,13 @@ INCLUDE (CheckIncludeFile)
INCLUDE (CheckIncludeFiles)
INCLUDE (CheckLibraryExists)
INCLUDE (CheckSymbolExists)
-INCLUDE (CheckTypeSize)
+# if crosscompiling is on, the CHECK_TYPE_SIZE macro coming with cmake uses
+# TRY_COMPILE instead of TRY_RUN which makes crosscompiling easier, Alex
+IF(CMAKE_CROSSCOMPILING)
+ INCLUDE ("${CMAKE_ROOT}/Modules/CheckTypeSize.cmake")
+ELSE(CMAKE_CROSSCOMPILING)
+ INCLUDE (CheckTypeSize)
+ENDIF(CMAKE_CROSSCOMPILING)
SET(libCurl_SRCS
# amigaos.c - does not build on AmigaOS
@@ -491,6 +497,7 @@ MACRO(CURL_INTERNAL_TEST CURL_TEST)
ENDIF(${CURL_TEST})
ENDIF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
ENDMACRO(CURL_INTERNAL_TEST)
+
MACRO(CURL_INTERNAL_TEST_RUN CURL_TEST)
IF("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
@@ -572,7 +579,6 @@ ENDIF(HAVE_FILE_OFFSET_BITS)
FOREACH(CURL_TEST
HAVE_GLIBC_STRERROR_R
HAVE_POSIX_STRERROR_R
- HAVE_LONG_LONG_CONSTANT
)
CURL_INTERNAL_TEST_RUN(${CURL_TEST})
ENDFOREACH(CURL_TEST)