Add darwin C source compile flag for MacOS
parent
bf8b534513
commit
4331631a27
|
@ -8,6 +8,11 @@ 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}
|
||||
|
|
Loading…
Reference in New Issue