diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2010-12-31 18:13:03 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2010-12-31 18:13:03 +0100 |
commit | 35502a5b07eff6a0893989a1ea7edb603087a7c6 (patch) | |
tree | 6f01531225a755be2349a0c168b1092b3cb8d2c3 /CMakeLists.txt | |
parent | 930bb01fffd23a04d744fab62e94ce8a4bd9e04c (diff) | |
download | eurephia-35502a5b07eff6a0893989a1ea7edb603087a7c6.tar.gz eurephia-35502a5b07eff6a0893989a1ea7edb603087a7c6.tar.xz eurephia-35502a5b07eff6a0893989a1ea7edb603087a7c6.zip |
Look for endian.h in include/sys as well.
On FreeBSD the endian.h file is located in sys/endian.h.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 08110c3..fa9348b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,6 +105,16 @@ ENDIF(PLUGIN) # Check for some standard glibc functions which we need # +# Check that we have enidan.h +CHECK_INCLUDE_FILE(endian.h HAVE_ENDIAN_H) +IF(NOT HAVE_ENDIAN_H) + CHECK_INCLUDE_FILE(sys/endian.h HAVE_SYS_ENDIAN_H) + ADD_DEFINITIONS(-DHAVE_SYS_ENDIAN_H) +ENDIF(NOT HAVE_ENDIAN_H) +IF(NOT HAVE_ENDIAN_H AND NOT HAVE_SYS_ENDIAN_H) + message(FATAL_ERROR "Missing endian.h") +ENDIF(NOT HAVE_ENDIAN_H AND NOT HAVE_SYS_ENDIAN_H) + # Check that we have dynamic loader available CHECK_INCLUDE_FILE(dlfcn.h HAVE_DLFCN_H) IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") |