Linux: Fix missing feature macro for using strdup

This adds _XOPEN_SOURCE = 500.

Fixes #1055.
This commit is contained in:
Camilla Löwy
2017-08-09 16:15:59 +02:00
parent 549308051d
commit 079518617c
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -74,7 +74,9 @@ set_target_properties(glfw PROPERTIES
POSITION_INDEPENDENT_CODE ON
FOLDER "GLFW3")
target_compile_definitions(glfw PRIVATE -D_GLFW_USE_CONFIG_H)
target_compile_definitions(glfw PRIVATE
-D_GLFW_USE_CONFIG_H
$<$<BOOL:${UNIX}>:_XOPEN_SOURCE=500>)
target_include_directories(glfw PUBLIC
$<BUILD_INTERFACE:${GLFW_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>)