Fixing the Linux build

master
Melroy van den Berg 2022-02-16 01:54:34 +01:00
parent 8ed72ddc4a
commit 45d73a8770
No known key found for this signature in database
GPG Key ID: 71D11FF23454B9D7
2 changed files with 2 additions and 10 deletions

View File

@ -5,14 +5,6 @@ set(LIBARY_NAME ${PROJECT_NAME})
# Create static library
add_library(${LIBARY_NAME} STATIC whereami.c whereami.h)
# Add X/Open definition for realpath
#target_compile_definitions(${LIBARY_NAME} PUBLIC _XOPEN_SOURCE=500)
# MacOS specific compile flag
#if(APPLE)
# target_compile_definitions(${LIBARY_NAME} PUBLIC _DARWIN_C_SOURCE)
#endif()
# Use PUBLIC iso INTERFACE, so the library itself also finds it's own header file
target_include_directories(
${LIBARY_NAME}

View File

@ -13,8 +13,8 @@ extern "C" {
#endif
#if defined(__linux__) || defined(__CYGWIN__)
#undef _BSD_SOURCE
#define _BSD_SOURCE
#undef _DEFAULT_SOURCE
#define _DEFAULT_SOURCE
#elif defined(__APPLE__)
#undef _DARWIN_C_SOURCE
#define _DARWIN_C_SOURCE