Add GLFW includes to target_include_directories

This makes it easier to build GLFW as a sub-project of another CMake based
project. Instead of having to use include_directories(path/to/glfw/include)
the project using GLFW will get the correct include path by just doing
target_link_libraries(myapp glfw ${GLFW_LIBRARIES}).
This commit is contained in:
m@bitsnbites.eu 2016-02-01 10:34:10 +01:00
parent 832c2ffa3b
commit e5601f1619

View File

@ -64,6 +64,9 @@ target_include_directories(glfw PRIVATE
"${GLFW_BINARY_DIR}/src" "${GLFW_BINARY_DIR}/src"
${glfw_INCLUDE_DIRS}) ${glfw_INCLUDE_DIRS})
# Make the public GLFW includes available for users of the GLFW library.
target_include_directories(glfw PUBLIC "${GLFW_SOURCE_DIR}/include")
# HACK: When building on MinGW, WINVER and UNICODE need to be defined before # HACK: When building on MinGW, WINVER and UNICODE need to be defined before
# the inclusion of stddef.h (by glfw3.h), which is itself included before # the inclusion of stddef.h (by glfw3.h), which is itself included before
# win32_platform.h. We define them here until a saner solution can be found # win32_platform.h. We define them here until a saner solution can be found