mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 05:36:35 +00:00
cmake: fix exported include dir path
target_include_directories used GLFW_INSTALL_INCLUDE_DIR which was undefined. The correct variable is CMAKE_INSTALL_INCLUDEDIR which is what the installer sections use.
This commit is contained in:
parent
566108d35a
commit
6ed81bb33c
@ -477,6 +477,8 @@ endif()
|
||||
#--------------------------------------------------------------------
|
||||
# Add subdirectories
|
||||
#--------------------------------------------------------------------
|
||||
include(GNUInstallDirs)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if (GLFW_BUILD_EXAMPLES)
|
||||
@ -495,7 +497,6 @@ endif()
|
||||
# Create generated files
|
||||
#--------------------------------------------------------------------
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(GLFW_INSTALL_CONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/glfw3")
|
||||
set(GLFW_INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
@ -65,7 +65,7 @@ if (NOT CMAKE_VERSION VERSION_LESS "2.8.11")
|
||||
# directories. TODO If/when cmake_minimum_required increases to
|
||||
# >=2.8.11, call this command unconditionally.
|
||||
target_include_directories(glfw PUBLIC
|
||||
$<INSTALL_INTERFACE:${GLFW_INSTALL_INCLUDE_DIR}>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>)
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user