diff options
author | Adrien Destugues <pulkomandy@pulkomandy.tk> | 2014-03-03 14:47:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-21 12:19:09 (GMT) |
commit | 84603d804c285c75f4bf81f9d79f0ebd0ca68fea (patch) | |
tree | 68486b6107422a335bc6d2f5b8233762da5c1aae /Source/CMakeLists.txt | |
parent | 0f79dab48bf17e867fe19a7b7140fa7513f4b72d (diff) | |
download | CMake-84603d804c285c75f4bf81f9d79f0ebd0ca68fea.zip CMake-84603d804c285c75f4bf81f9d79f0ebd0ca68fea.tar.gz CMake-84603d804c285c75f4bf81f9d79f0ebd0ca68fea.tar.bz2 |
Haiku: Enable CMake builtin ELF editor
Co-Author: Brad King <brad.king@kitware.com>
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r-- | Source/CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 762470f..27d099d 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -18,6 +18,23 @@ else() endif() if(HAVE_ELF_H) set(CMAKE_USE_ELF_PARSER 1) +elseif(HAIKU) + # On Haiku, we need to include elf32.h from the private headers + set(CMake_HAIKU_INCLUDE_DIRS + /boot/system/develop/headers/private/system + /boot/system/develop/headers/private/system/arch/x86 + ) + + set(CMAKE_REQUIRED_INCLUDES ${CMake_HAIKU_INCLUDE_DIRS}) + CHECK_INCLUDE_FILE("elf32.h" HAVE_ELF32_H) + unset(CMAKE_REQUIRED_INCLUDES) + + if(HAVE_ELF32_H) + set(CMAKE_USE_ELF_PARSER 1) + else() + unset(CMake_HAIKU_INCLUDE_DIRS) + set(CMAKE_USE_ELF_PARSER) + endif() else() set(CMAKE_USE_ELF_PARSER) endif() @@ -57,6 +74,7 @@ include_directories( ${CMAKE_EXPAT_INCLUDES} ${CMAKE_TAR_INCLUDES} ${CMAKE_COMPRESS_INCLUDES} + ${CMake_HAIKU_INCLUDE_DIRS} ) # let cmake know it is supposed to use it |