mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 05:36:35 +00:00
Remove CMake <2.8.12 declarations
This commit is contained in:
parent
6eb7c7d6a0
commit
8117f78a23
@ -191,13 +191,7 @@ CMake can import settings from CMake package file, which GLFW supports.
|
|||||||
find_package(glfw3 REQUIRED)
|
find_package(glfw3 REQUIRED)
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
This registers glfw imported target in your build. If you re using CMake < 2.8.11, to be able to include
|
This registers glfw imported target in your build.
|
||||||
the GLFW header, you need to tell your compiler where it is.
|
|
||||||
|
|
||||||
@code{.cmake}
|
|
||||||
include_directories(${GLFW3_INCLUDE_DIR})
|
|
||||||
@endcode
|
|
||||||
|
|
||||||
You need to link against glfw library and its transitive dependencies (platform-specific).
|
You need to link against glfw library and its transitive dependencies (platform-specific).
|
||||||
|
|
||||||
@code{.cmake}
|
@code{.cmake}
|
||||||
|
@ -59,15 +59,9 @@ endif()
|
|||||||
|
|
||||||
add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})
|
add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})
|
||||||
target_link_libraries(glfw ${glfw_LIBRARIES})
|
target_link_libraries(glfw ${glfw_LIBRARIES})
|
||||||
if (NOT CMAKE_VERSION VERSION_LESS "2.8.11")
|
target_include_directories(glfw PUBLIC
|
||||||
# CMake 2.8.11 introduced the target_include_directories command to
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||||
# include and/or export public, private, and interface include
|
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>)
|
||||||
# directories. TODO If/when cmake_minimum_required increases to
|
|
||||||
# >=2.8.11, call this command unconditionally.
|
|
||||||
target_include_directories(glfw PUBLIC
|
|
||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_target_properties(glfw PROPERTIES
|
set_target_properties(glfw PROPERTIES
|
||||||
OUTPUT_NAME "${GLFW_LIB_NAME}"
|
OUTPUT_NAME "${GLFW_LIB_NAME}"
|
||||||
|
Loading…
Reference in New Issue
Block a user