From 8117f78a2350fc81c9835fa1e28b217211e4f256 Mon Sep 17 00:00:00 2001 From: Zbigniew Mandziejewicz Date: Mon, 5 Oct 2015 01:12:04 +0800 Subject: [PATCH] Remove CMake <2.8.12 declarations --- docs/build.dox | 8 +------- src/CMakeLists.txt | 12 +++--------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/docs/build.dox b/docs/build.dox index f9265d75f..bf635fc6e 100644 --- a/docs/build.dox +++ b/docs/build.dox @@ -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} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f1e0f4ae9..37a762c78 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 - $ - $) -endif() +target_include_directories(glfw PUBLIC + $ + $) set_target_properties(glfw PROPERTIES OUTPUT_NAME "${GLFW_LIB_NAME}"