diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 311ae1b59..86229b464 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -59,7 +59,13 @@ endif() add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS}) target_link_libraries(glfw ${glfw_LIBRARIES}) -target_include_directories(glfw PUBLIC $) +if (NOT CMAKE_VERSION VERSION_LESS "2.8.11") + # CMake 2.8.11 introduced the target_include_directories command to + # include and/or export public, private, and interface include + # directories. TODO If/when cmake_minimum_required increases to + # >=2.8.11, call this command unconditionally. + target_include_directories(glfw PUBLIC $) +endif() set_target_properties(glfw PROPERTIES OUTPUT_NAME "${GLFW_LIB_NAME}"