Remove CMake <2.8.12 declarations

This commit is contained in:
Zbigniew Mandziejewicz 2015-10-05 01:12:04 +08:00
parent 6eb7c7d6a0
commit 8117f78a23
2 changed files with 4 additions and 16 deletions

View File

@ -191,13 +191,7 @@ CMake can import settings from CMake package file, which GLFW supports.
find_package(glfw3 REQUIRED)
@endcode
This registers glfw imported target in your build. If you re using CMake < 2.8.11, to be able to include
the GLFW header, you need to tell your compiler where it is.
@code{.cmake}
include_directories(${GLFW3_INCLUDE_DIR})
@endcode
This registers glfw imported target in your build.
You need to link against glfw library and its transitive dependencies (platform-specific).
@code{.cmake}

View File

@ -59,15 +59,9 @@ endif()
add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})
target_link_libraries(glfw ${glfw_LIBRARIES})
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
target_include_directories(glfw PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>)
endif()
set_target_properties(glfw PROPERTIES
OUTPUT_NAME "${GLFW_LIB_NAME}"