Fixing the Linux build
parent
8ed72ddc4a
commit
45d73a8770
|
@ -5,14 +5,6 @@ set(LIBARY_NAME ${PROJECT_NAME})
|
||||||
# Create static library
|
# Create static library
|
||||||
add_library(${LIBARY_NAME} STATIC whereami.c whereami.h)
|
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
|
# Use PUBLIC iso INTERFACE, so the library itself also finds it's own header file
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
${LIBARY_NAME}
|
${LIBARY_NAME}
|
||||||
|
|
|
@ -13,8 +13,8 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__CYGWIN__)
|
#if defined(__linux__) || defined(__CYGWIN__)
|
||||||
#undef _BSD_SOURCE
|
#undef _DEFAULT_SOURCE
|
||||||
#define _BSD_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
#undef _DARWIN_C_SOURCE
|
#undef _DARWIN_C_SOURCE
|
||||||
#define _DARWIN_C_SOURCE
|
#define _DARWIN_C_SOURCE
|
||||||
|
|
Loading…
Reference in New Issue