summarylogtreecommitdiffstats
path: root/cmake-include-paths.patch
blob: 952c6a64b74b8f975ac465a2917a8826d6ad10e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# HG changeset patch
# User Bastien Bouclet <bastien.bouclet@gmail.com>
# Date 1523420183 -7200
#      Wed Apr 11 06:16:23 2018 +0200
# Branch cmake-include-path
# Node ID 52f0351c30b25ec2bb5b0bced247ba858991bec2
# Parent  fbfacc66c65c3b38ca065ecee1f69fcbc643c14a
Fix the include path in the installed CMake target import file

Previously the include path was {INSTALL_PREFIX}/include,
it is now {INSTALL_PREFIX}/include/SDL2 to be consistent with
the other build and package configuration systems.

Fixes #4128.

diff -r fbfacc66c65c -r 52f0351c30b2 CMakeLists.txt
--- a/CMakeLists.txt	Mon Mar 26 12:38:29 2018 -0700
+++ b/CMakeLists.txt	Wed Apr 11 06:16:23 2018 +0200
@@ -1695,7 +1695,7 @@
 
 # Always build SDLmain
 add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
-target_include_directories(SDL2main PUBLIC $<INSTALL_INTERFACE:include>)
+target_include_directories(SDL2main PUBLIC $<INSTALL_INTERFACE:include/SDL2>)
 set(_INSTALL_LIBS "SDL2main")
 if (NOT ANDROID)
   set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
@@ -1724,7 +1724,7 @@
   endif()
   set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
   target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
-  target_include_directories(SDL2 PUBLIC $<INSTALL_INTERFACE:include>)
+  target_include_directories(SDL2 PUBLIC $<INSTALL_INTERFACE:include/SDL2>)
   if (NOT ANDROID)
     set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
   endif()
@@ -1750,7 +1750,7 @@
   # libraries - do we need to consider this?
   set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS})
   target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
-  target_include_directories(SDL2-static PUBLIC $<INSTALL_INTERFACE:include>)
+  target_include_directories(SDL2-static PUBLIC $<INSTALL_INTERFACE:include/SDL2>)
   if (NOT ANDROID)
     set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
   endif()