diff options
author | Vaxry <[email protected]> | 2023-10-11 22:27:53 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-10-11 22:27:53 +0100 |
commit | 06cc42441cd5b24444f7c79495851dedde8bc732 (patch) | |
tree | f923972dc0398dd45e0bc3c9de593ff6fc4e47a5 /CMakeLists.txt | |
parent | 5dc7161b1da7c9ad97122458c94c833b69eb5769 (diff) | |
download | Hyprland-06cc42441cd5b24444f7c79495851dedde8bc732.tar.gz Hyprland-06cc42441cd5b24444f7c79495851dedde8bc732.zip |
build: guard execinfo.h via build systems (#3547)
* guard execinfo via cmake
* libexecinfo -> execinfo macro name
* meson: add execinfo check
* move check in cmake up
---------
Co-authored-by: Mihai Fufezan <[email protected]>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 29eccd64..b67314bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,12 @@ if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) add_link_options(-pg -no-pie -fno-builtin) endif() +check_include_file("execinfo.h" EXECINFOH) +if(EXECINFOH) + message(STATUS "Configuration supports execinfo") + add_compile_definitions(HAS_EXECINFO) +endif() + include(CheckLibraryExists) check_library_exists(execinfo backtrace "" HAVE_LIBEXECINFO) if(HAVE_LIBEXECINFO) |