diff --git a/CMakeLists.txt b/CMakeLists.txt index 16e2978..658944b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,7 @@ include(CheckFunctionExists) check_function_exists(longjmp HAVE_LONGJMP) check_function_exists(siglongjmp HAVE_SIGLONGJMP) check_function_exists(clock_nanosleep HAVE_CLOCK_NANOSLEEP) +check_function_exists(nanosleep HAVE_NANOSLEEP) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/config.h @@ -120,6 +121,9 @@ if(CMAKE_VERSION VERSION_LESS "3.12") if(HAVE_CLOCK_NANOSLEEP) add_definitions(-DHAVE_CLOCK_NANOSLEEP) endif() + if(HAVE_NANOSLEEP) + add_definitions(-DHAVE_NANOSLEEP) + endif() if(HAVE_SSM) add_definitions(-DHAVE_SSM) endif() @@ -133,6 +137,9 @@ else() if(HAVE_CLOCK_NANOSLEEP) add_compile_definitions(HAVE_CLOCK_NANOSLEEP) endif() + if(HAVE_NANOSLEEP) + add_compile_definitions(HAVE_NANOSLEEP) + endif() if(HAVE_SSM) add_compile_definitions(HAVE_SSM) endif()